Adam Bien's Weblog

Wednesday Oct 06, 2010

Java EE 6, JBoss 6 (is it usable?) And The Server Smoke Test

jboss-6.0.0.20100911-M5 is out. And it comes with a bunch of Java EE 6 improvements. I wrote a ServerSmokeTest application (with maven build in NetBeans 6.9.1) to test some features like:

  1. Stereotypes (encapsulating @Named and @RequestScoped)
  2. @RequestScoped, @Named CDI-Beans
  3. Accessing @RequestScoped Managed Bean from a JSF page with EL
  4. Injection of EJB 3.1 (no interface view), into CDI bean
  5. Injection of EJB 3.1 (no interface view) @Singleton, into @Stateless EJB 3.1 bean
  6. Local distribution of CDI-events
  7. Injecting POJOs with @Inject into EJB 3.1
  8. Intercepting Beans with @AroundInvoke
Boot time of JBoss 6m5 is about 15.7 secs. Everything worked out-off-the-box without any problems. The installation is easy (=unzip) and the server comes even with a graphical admin console. To test it yourself just go to the project (inside ServerSmokeTest), execute mvn clean install and copy the ServerSmokeTest.war into: jboss-6.0.0.20100911-M5/server/default/deploy. Wait few seconds (~5) and you should see the deployment messages. The full deployment takes about 3 seconds. The same application runs in Glassfish v3.0.1 without any modification. Just copy the ServerSmokeTest.war into glassfishv3.0.1/glassfish/domains/domain1/autodeploy/.

You can start the application in either server with: http://localhost:8080/ServerSmokeTest/. Persistence is not tested yet (at least it is not a part of the application).
[Thanks to the JBoss engineers. I was invited to the JBoss OneDayTalk conference and downloaded JBoss 6m5 night before my talk. I used JBoss instead of Glassfish to explain Java EE 6 without any tooling (NetBeans 6.9.1 only supports JBoss 5, but not 6) - and it worked. My pulse, however, was a bit higher than usual :-).]


NEW: Java EE 7 Testing and Quality Workshop

A book about rethinking Java EE Patterns

Comments:

Do you have comparative values for the boot and deploy duration on glassfish?

Posted by Markus Pielmeier on October 06, 2010 at 03:35 PM CEST #

@Markus,

JBoss 6m5 is surprisingly fast. Seems to be slightly slower, than Glassfish. It is, however, not even a RC - so you cannot compare the performance now (would be unfair).

thanks!,

adam

Posted by adam-bien.com on October 06, 2010 at 06:21 PM CEST #

It works on GF 3.0.1 without changes - it means this is a toy project that doesn't prove anything. GF 3.0.1 is unusable. Stop pretending otherwise.

Posted by ucilala on October 08, 2010 at 01:21 PM CEST #

@Ucilala,

>"it means this is a toy project that doesn't prove anything"

This is true - I only tested the features described in this post. The project, however, was pushed into a public repository: http://kenai.com/projects/javaee-patterns/sources/hg/show/ServerSmokeTest

So please change or extend it, so that it breaks - then we could file a bug. Either send me a patch, or I will provide you commit rights.

I use GF 3.0.1 in production - and it works really well for me.
Btw. JBoss 6m5 is working also well so far. I didn't used it in any project yet (is too new)

thanks for the semi-constructive comment!,

adam

Posted by adam-bien.com on October 08, 2010 at 09:53 PM CEST #

Good article!

Check out SIwpas, Java EE Web Profile Server. I have deployed smoke application in SIwpas and deploys in ~1 s :)

URL : http://code.google.com/p/siwpas/

Enjoy!

Posted by Gurkan Erdogdu on October 10, 2010 at 09:08 PM CEST #

Just package it differently, like JPA in a separate module, EJB separately, web separately, in an EAR, then try to weld it together with CDI and so on. Try to use JMS, create JMS producers in CDI. And then, deploy on 3.0.1...

I saw your project, about 7 files, not more than 150 lines of code in total (counting empty lines, comments, and annotations). Please...

I am working on GF 3.1-buildXX every single day, especially the embedded EJB thingie (that I love if it works as expected) I filed a lot of bugs, created many workarounds and also included them in the bugs. All is nice until a new build comes that makes the project not work any more. But this is expected, these are snapshots. But, we are using them as GF 3.0.1 is unusable.

Take your nose out of marketing, go to Weld site (you can read about problems with both GF and JBoss), go to the GF forums and looks for CDI bashing posts.

A big 'thank you, but no, thank you' for your semi-constructive posts and totally nonconstructive and misleading messages about the state of Jave EE 6.

Posted by Ucilala on October 12, 2010 at 06:42 PM CEST #

Hi Ucilala,

I like this comment a lot better - its almost constructive.

>"Just package it differently, like JPA in a separate module, EJB separately, web separately, in an EAR, then try to weld it together with CDI and so on. Try to use JMS, create JMS producers in CDI. And then, deploy on 3.0.1..."

I did some EAR tests in Glassfish v3. But all my production applications are WAR:

http://www.adam-bien.com/roller/abien/entry/is_java_ee_6_war

In my current project there was no single requirement for EARs - so we use WARs.

>"I saw your project, about 7 files, not more than 150 lines of code in total (counting empty lines, comments, and annotations). Please..."

And did you actually read the title of my post "SmokeTest": see: http://en.wikipedia.org/wiki/Smoke_testing

I'm consultant and have to sign everywhere a NDA. I just cannot write posts about the production code...
>"I am working on GF 3.1-buildXX every single day, especially the embedded EJB thingie (that I love if it works as expected) "

You see - thats the first difference. I don't use the embedded EJBContainer for testing. I'm creating the Glassfish domains with maven in CI (hudson) and automatically deploy the application to the "real" integration server. But so far: the embeddable container is really interesting.

"I filed a lot of bugs"

But not more than I - I actually won the FishCAT competition :-):
See (abien):
https://glassfish.dev.java.net/quality/v3/fishcat-v3-bugs.html

https://glassfish.dev.java.net/servlets/ReadMsg?list=quality&msgNo=1444

https://glassfish.dev.java.net/servlets/ReadMsg?list=quality&msgNo=1274

Marketing? I cannot expose the bugs more publicly: http://www.adam-bien.com/roller/abien/entry/why_you_should_file_bugs1

I'm working with Java since 1995 - but the only thing what remains the same is the constant stream of bugs waiting to be fixed. Recently we found even a bug in JDK 1.5. And today a bug in Glassfish v3.0.1...

keep on commenting that way (it seems like you don't like the thank you...)

adam

Posted by adam-bien.com on October 13, 2010 at 02:16 AM CEST #

Did anyone test jboss 6 and axis2 (v.2.5.1)?

I got lots of problem on doing this task and stil i am working on it.

Posted by stmod on November 27, 2010 at 08:29 PM CET #

Hello, One Big problem with JBoss6 final release,
If I create Message Driven bean under JBoss 6, NetBeans 7.0 Beta show that he could not find javax.jms.Message
package....ufffff under glassfish 3.1 all ok. that i can do?

Posted by armen on February 05, 2011 at 03:20 PM CET #

hi ;;;;;

Posted by 110.234.148.136 on March 28, 2011 at 02:46 PM CEST #

I need help configuration Jboss 5 with EJB 3 in Netbean 6.9.1 ?Please help me!

Posted by TaiKim on May 11, 2011 at 08:34 PM CEST #

Post a Comment:
  • HTML Syntax: NOT allowed
realworldpatterns.com
...the last 150 posts
...the last 10 comments
Links
License