Using Glassfish + GWT in development mode

Okey, so here's how IM works:

  • Im using EJB (3.x) for my service level
  • Im using GWT for my visual layer
  • GWT interaction with EJB with debencing injection (@EJB annotation)

So the problem is that im woking is slow, because whenever I make a small change in my GWT layer, I have to compile, which takes some time. I was wondering if there is a way to work with Glassfish + GWT + EJB in production mode

+4
source share
2 answers

To make it work, you must do the following: 1. Deploy ejb only on Glassfish (for development mode). It makes no sense to create a full-fledged ear when you need a web part in development mode. 2. Use remote interfaces (we use a service locator that determines whether it should work on local or remote interfaces for EJB). 3. Add gf-client.jar to load records in the GWT development mode (when starting from eclipse). 4. Add the jar jar client to the class path entries in GWT dev mode.

A setting like this will save a lot of time on recompilation when you change something on the GWT website (you just click the reset button and it works with the new code). When you change something on the ejb side, you still need to close dev mode, restart ejb and run dev mode again to make it work.

This is not a very simple setup, but it works. We use maven profiles to create ejb for development only and full ear for production.

There will also be a noserver mode, which will be a little easier (it will connect to a web part deployed on a glass planet, not a pier), but it is less productive, since each change on the GWT RPC side takes a lot of time to recompile and relocate the war ( or full ear).

+1
source

in this case, you do not need to deploy the service level. You can work in posting mode to see the changes on the GWT side.

http://code.google.com/eclipse/

with the google plugin that you run in eclipse and only see page refresh changes. Jetty is an eclipse server for developing GWT-based web applications.

0
source

All Articles