Adam Bien's Weblog
Ride The Lightning: Java EE 6 Server JBoss 7 - A Smoke Test
JBoss 7.0 is an opensource, fast and easy to install Java EE 6 (WebProfile and uncertified full profile
) application server.
- Download size of WebProfile 7.0.0.Final is: 66 MB The size of "everything edition" is: 72 MB
- Installation = Unzip
- Disc size: 78,5MB after installation
- Startup: Execution of
jboss-as-web-7.0.0.Final/bin/standalone.shis extremely fast (< 3 secs):
"…(Controller Boot Thread) JBoss AS 7.0.0.Final "Lightning" started in 2688ms…"
- Deployment: copy of the ServerSmokeTest.war into jboss-as-web-7.0.0.Final/standalone/deployments/. App is available under: http://localhost:8080/ServerSmokeTest
- Full deployment of ServerSmokeTest took < 2 secs.
- Tested were: Stereotypes (encapsulating @Named and @RequestScoped), @RequestScoped, @Named CDI-Beans, Injection of EJB 3.1 (no interface view), into CDI bean, @Singleton,@Stateless, CDI-events, POJO-injection, Interceptors
- ServerSmokeTest works without any modification on Glassfish v3, JBoss 6m5, SIwpas-1.0.0-CR4, resin-4.0.12 ...and almost JBoss 7:
- Startup: Execution of
The application was deployable without any modifications - but the invocation didn't work. A minor DI bug prevented the injection of an EJB into a CDI managed bean:
java.lang.RuntimeException: No EjbLookup registry has been provided CDI @EJB injection [field] @EJB com.abien.smokingservers.presentation.Index.fireStarter at org.jboss.as.weld.services.bootstrap.WeldEjbInjectionServices.resolveEjb(WeldEjbInjectionServices.java:108) at org.jboss.weld.util.Beans.injectEEFields(Beans.java:775) at org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget$1$1.proceed(ManagedBean.java:181) at org.jboss.weld.injection.InjectionContextImpl.run(InjectionContextImpl.java:54) at org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget$1.work(ManagedBean.java:176) at org.jboss.weld.bean.ManagedBean$FixInjectionPoint.run(ManagedBean.java:142) at org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget.inject(ManagedBean.java:170) at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:339)
Injection of fields annotated with @EJB does not work in JBoss 7. It was used in two places in the ServerSmokeTest application. I just replaced all occurrences of @EJB with @Inject and after redeployment the application worked perfectly. It is a known problem and is going to be fixed in Jboss 7.0.1. Please keep in mind that the ServerSmokeTest is just a Smoke Test and not a TCK.
For more details see: http://www.jboss.org/as7.html. So we got another capable Java EE 6 application server!
NEW Workshop: "JPA, NoSQL, Caching, Grids and Distributed Caches with Java EE 7", May 7th, 2013, Airport Munich Tweet Follow @AdamBien