Search This Blog

2009-12-13

So JavaEE 6 and Glassfish V3 are ready to rock!

Hi guys,

I want to tell you my first experiences with JavaEE 6 and Glassfish V3.
By the way, I favor Netbeans over Eclipse because of the great JavaEE wizards and maven integration (Netbeans Version 6.8 was released on the same day as Glassfish V3)

The first thing I did was trying to deploy my JavaEE 5 application on glassfish V3. BUT, not as an EAR project, but as a Web Project.
I really like the fact, that you don't necessarily need the EAR packaging. If you put your packaged EJB Content (xxx.jar) into the folder WEB-INF/lib of your WebProject, Glassfish automatically recognizes that your application contains EJBs. The same if have JPA Entities.



One of the biggest benefits I get from using only the WAR file is the great deployment time and the Deploy on Save functionality. There are still problems with Netbeans if you want to use the deploy on save feature with maven built javaEE projects. (Ear, War, EJB), see this post. But with only one war file all the changes you do to your web project will be deployed automatically. You just have to turn on the Deploy on Save within the Projects Properties .



Starting GlassFish V3 and deploying my application on my MacBook Pro takes about 19 seconds:
INFO: GlassFish v3 (74.2) startup time : Felix(3459ms) startup services(15633ms) total(19092ms)
Once started the redeployment due to deploy on save is so fast, i don't event see netbeans redeployment status window in the corner down right. :)
So to make my application be JavaEE 6 compatible I also had to do some changes on the Web Project itself. I had to update the web.xml and I moved the configuration within the faces-config.xml into the beans itself by using the following annotations:
@ManagedBean(name = "Login")
@RequestScoped

But as I use ICEFaces and ICESoft hasn't released the final JSF2.0 compatible version I still have to wait until I can benefit from this great perfomance boost, JavaEE6 will bring. There is a alpha release of ICEFaces V2.0 however, there's too much things to fix if you want to make it work. If you are interested in the latest problems see this post.

So this was just my first impression on JavaEE6 and glassfish. I will tell you more about the new features of JavaEE as soon as ICEFaces 2.0 is released.
Greetings and have a nice day!

1 comment: