Arun Gupta is a technology enthusiast, avid runner, author of a best-selling book, globe trotter, a community guy, Java Champion, JavaOne Rockstar, JUG Leader, Minecraft Modder, Devoxx4Kids-er, and a Red Hatter.
Do you want @Transactional and @TransactionScoped-like features introduced in Java EE 7 in JBoss EAP 6.x or any other Java EE 6 compliant application server ?
Need a CDI scope for window/tab for a JSF application ?
Simplified JPA Criteria API ?
How about boot and shutdown CDI container in a Java SE application ?
Simplified annotation-based security in Java EE ?
This is not a wish list for Java EE 8, but is possible today using DeltaSpike. All of this is possible by using the power of CDI portable extensions to unleash the power of a Java EE application server beyond what is defined in the existing specifications.
DeltaSpike consist of a number of portable CDI extensions that provide useful features for Java application developers.
What are CDI portable extensions ?
CDI portable extensions extend the functionality of the container using an Service Provider Interface (SPI). A portable extension may integrate with the container by:
DeltaSpike also ensure true portability! They are tested on different CDI implementations like JBoss Weld and Apache OpenWebBeans, and also on different Java EE servers like Apache Tomcat and TomEE, JBoss AS7, WildFly 8, Oracle GlassFish 3.1+ and 4.x+, IBM WebSphere 8.x, Oracle WebLogic Server 12c, Jetty, and others.
DeltaSpike has a core API and Impl module. The extensions themselves are available in different modules:
You may realize that some of the functionality is already available in Java EE 7 so this would certainly be lot more relevant to Java EE 6 compliant application server. But there are still several features that can be used in Java EE 7 compliant app servers, like WildFly. And then it has the potential to be the playground for new features that are being discussed in Java EE 8!
Getting started is easy if you are using Maven. Add core and impl <dependency>s to “pom.xml”:
<dependency> <groupId>org.apache.deltaspike.core</groupId> <artifactId>deltaspike-core-api</artifactId> <version>${deltaspike.version}</version> <scope>compile</scope> </dependency> <dependency> <groupId>org.apache.deltaspike.core</groupId> <artifactId>deltaspike-core-impl</artifactId> <version>${deltaspike.version}</version> <scope>runtime</scope> </dependency>
And then configure one of the modules as explained here.
Complete documentation for all the modules is available here.
One of the frequently needed features is accessing ServletRequest in a CDI bean. With DeltaSpike, this can be easily achieved using the following annotation:
@Inject @DeltaSpike private ServletRequest request
A complete sample showcasing this functionality is available at github.com/arun-gupta/wildfly-samples/tree/master/deltaspike.
DeltaSpike 1.0 was recently announced and the complete list of JIRA tickets fixed is here.
There are usual ways to connect with the team:
Let us know what would you like to see in DeltaSpike!
So it’s something like Spring? … it surely looks like Spring.
Only better
Actually it’s a mix between Seam3, CDISource and a huge inspiration on Spring.