Reputation: 7154
Okey so this is how im currently working:
So the problem is that im woking kind of slow because whenever i make a small change to my GWT layer I have to compile wich takes some time. I was wondering if there was a way to work with Glassfish + GWT + EJBs in production mode
Upvotes: 4
Views: 2359
Reputation: 1531
To make it work you should do following things: 1. Deploy ejb only on Glassfish (for development mode). It's no point to build full ear when you want web part in development mode. 2. Use remote interfaces (we're using service locator that detects whether it should work on local or remote interfaces for EJBs). 3. Add gf-client.jar to bootstrap entries of GWT development mode (while launching from eclipse). 4. Add ejb client jar to classpath entries of GWT dev mode.
Setup like this will save you time consuming recompilations when you change something on the GWT site (you just hit reload button and it works with new code). When you change something on the ejb's side you still have to close dev mode, redeploy ejb and launch dev mode again, to make it work.
It's not very straightforward setup but it works. We're using maven profiles to produce ejb only build for development and full ear for production.
There's also noserver mode that will be a little bit simpler (it will connect to web part deployed on glassfish, not jetty) but it's less productive, because each change on GWT RPC side requires time-consuming recompilation and redeploy of war (or full ear).
Upvotes: 1
Reputation: 4260
in that case you don't need to deploy service layer. You could work with hosted mode to see changes on GWT side.
http://code.google.com/eclipse/
with google plug-in you run in eclipse and see changes only page refresh. Jetty is a server in eclipse to develop GWT based web applications.
Upvotes: 0