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!
Jboss 7 doesnt support the full jee-stack - you cant access remote ejbs via rmi. So its useless for a fat client.
maybe they want to include it in 7.1.0.
Posted by Felix on August 15, 2011 at 11:47 AM CEST #
in the last 5 years I almost exlusively used JAX-RS (http://www.adam-bien.com/roller/abien/entry/simplest_possible_ejb_3_13) and Hessian (http://www.adam-bien.com/roller/abien/entry/ejb_3_1_hessian_almost) for the fat client communication. It worked perfectly. I wouldn't call Jboss 7 "useless". Actually it is very capable.
thanks for your opinion,
Posted by Adam Bien on August 15, 2011 at 12:54 PM CEST #
JBoss AS 7.0.0 supports the Java EE Web Profile. AS 7.1.0 will support the full stack.
We could have waited until we supported the full stack but thought it was better to release something (i.e. the Web Profile) early
Posted by Kabir Khan on August 15, 2011 at 02:36 PM CEST #
useless is maybe the wrong word. Ofc there are workarounds for the fat client communication, but I was very surprised that these elements are missing out on this master-release.
For my application I've to wait till 7.1.0 ;(
Posted by Felix on August 16, 2011 at 02:28 PM CEST #
What about Geronimo 3?
When will be available?
Posted by jamto on August 16, 2011 at 02:34 PM CEST #
Did you try out the just-released 7.0.1 with your smoke test?
(So far I've been very pleased with JBoss AS 7, but I ran into the same injection bug described above.)
Posted by Klaus on August 18, 2011 at 01:06 PM CEST #