we are starting refactoring our the 'next gen' application.
We have chosen to use gwt.
We are trying out gxt.
Our persistence model is ejb3 + dao and so on (no spring)
do someone have some examples? Even with 1 bean and 1 gwt/gxt 'page'?
Maybe using the BeanModel concept?
just to be clear i'd like to have, if possible, two eclipse project.
- The first as ejb project with min. 2 pojos (user / post / ... ) and respective daos.
- The second one will be a gwt project, using gxt libraries. Presenting a login page with user credential check on user table, user data save on session (current user id, current role, group and so on) and listing of user's posts, ev. with add/modify functionalities (using ejbs and daos)
have someone such simple example?
could someone help me figure out how to do it? maybe we could open a new google code project to host this ejb-gwt+gxt example...
What do you think?
Thank you
Kindly
elvisd
Last edited by elvisd79; 25 Sep 2008 at 11:54 PM.
Reason: removing typo-smilies
There is nothing inherently special about using EJBs with Gxt. The general pattern I follow is one RCP servlet per EJB.
The work flow would be:
User press button to do foo.
GXT app calls foo method on RPC servlet.
RPC servlet calls foo method on EJB.
As far as using the EJBs they work the same as they would from a servlet. The only thing you have to keep in mind is you can't just serialize any object and expect it to work on the client. Spcificly hibernate(JPA) objects over to the client. You will need a DTO (I use a DTO) for the hibernate object, or use something like hibernate4gwt(that name might be wrong).