Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java EE6 and GWT

Tags:

gwt

java-ee-6

I would like to use GWT as an alternative frontend for a Java EE 6 application. What is the best practice architectural approach?

I've worked through the GWT tutorial from Google (StockWatcher) but I am wondering how to 'exchange' the GWT backend for a Java EE 6 backend.

like image 675
tobiasbayer Avatar asked Mar 12 '26 02:03

tobiasbayer


2 Answers

GWT runs (as JavaScript) in a browser, so it communicates with a web server simply by using HTTP requests. If you choose Servlets (RemoteServiceServlets for GWT-RPC) to respond to these requests, you can use any servlet container to host the Servlets.

In development mode, you can use the -noserver option to use your own server instead of the built-in Jetty.

like image 123
Chris Lercher Avatar answered Mar 14 '26 01:03

Chris Lercher


You can call ejbs from RPC servlets. I prefer not to user -noserver. Instead we are using JEE6 EJB's deployed on Glassfish 3.1 for development (you can deploy standalone EJB, outside EAR on 3.1 - you can't do that on 3.0). Development mode works fine with remote interfaces if you add gf-client.jar to the classpath. You can also create ServiceLocator that will use remote interfaces while in development mode, and local while invoked from war deployed in the same ear as ejb.

like image 31
jgrabowski Avatar answered Mar 13 '26 23:03

jgrabowski