tags:

views:

115

answers:

1

I am developing a GWT application that uses EJB and other Java EE 6 technology as the backend. I am currently using the GWT 2.0 plugin for Safari.

When I change my GWT client side code and save in my IDE (NetBeans), all that's required is a simple reload in the browser for the changes to become active. That works great!

However, often I work on the server-side (the EJBs, GWT server code, etc) and then something in on the GWT client side. Any changes done to the server-side do not appear to incrementally deploy to the Glassfish V3 server. Currently I close the GWT Development Mode application, and then recompile the EJBs, and then go back into GWT Development mode. That is tedious.

Any better way of doing this? I tried the "deploy on save" option in NetBeans but it does not seem to do the trick.

+1  A: 

The trick is to create an exploded ear directory (instead of an ear file) and deploy that in your application server. It works in JBoss and Weblogic, and should work in glassfish, but haven't tried it.

The idea is that you don't use any archives at all. In you war directories, create a WEB-INF/classes folder, and configure your IDE to write the class files in this directory. That way, when you change a java file in your IDE, it will write to your classes directory and the JVM will hot-deploy your classes.

There are some restrictions with this approach. If you change a method signature or add a class or new method, JVM cannot pick it up. In such cases, touching web.xml redeploys the WAR. This in itself is an improvement from restarting the entire application server.

It takes an hour or two to get the right setup, but after that you will just love it.

sri
Thanks, will try this!
T.K.