How to integrate Hibernate and GWT

9 views
Skip to first unread message

Dessorry

unread,
Dec 3, 2008, 5:13:40 AM12/3/08
to Google Web Toolkit
Hi,
I'm trying to build my first GWT application; i would read data from a
database and display it on a simple gwt page.
I create in Eclipse my Web Dynamic Project.
I put my POJO class in mypackage.server and the class with entrypoint
in mypackage.client.
I create a new GWT Remote Service with Eclipse.
Now where must i put the hibernate code to access database?
p.s.in mypackage.server there are hibernate.cfg.xml and pojo.hbm.xml

thanks

eggsy84

unread,
Dec 3, 2008, 9:11:38 AM12/3/08
to Google Web Toolkit
Hi there,

Try searching the group there have been many posts discussing
Hibernate and GWT and how to implement them together.

Eggsy

Martin

unread,
Jan 9, 2009, 6:15:37 AM1/9/09
to Google Web Toolkit
if you want to take a look at a toplink JPA based solution, check out
http://toools.org

cheers

On Dec 3 2008, 11:13 am, Dessorry <niccolo.gianner...@gmail.com>
wrote:

Sumit Chandel

unread,
Jan 12, 2009, 7:24:27 PM1/12/09
to Google-We...@googlegroups.com
Hi Dessorry,

In terms of where to put your Hibernate code, you're most likely to get useful replies and information on the Hibernate site and discussion forum:

Hibernate homepage:
http://www.hibernate.org/

About using your Hibernate objects in GWT - as you will discover by searching threads in this forum about the subject, you normally can't use Hibernate objects directly in GWT RPC because of the types used in Hibernate that aren't supported by GWT's emulated JRE. However, you can always create data transfer objects that mirror your Hibernate objects. These are regular POJOs that obey the constraints of the emulated JRE. In addition to this and other techniques you might find in a group search, you can also use the Gilead library which is designed for the purpose of integrating Hibernate with GWT.

Chances are that since you're just getting started out with GWT, there are probably more than a few terms in the preceding paragraph that might have you scratching your head. Check out the links below for more info and feel free to post back if you have an additional questions.

GWT emulated JRE:
http://code.google.com/docreader/#p=google-web-toolkit-doc-1-5&s=google-web-toolkit-doc-1-5&t=RefJreEmulation

Gilead project:
http://noon.gilead.free.fr/gilead/

Hope that helps,
-Sumit Chandel

eggsy84

unread,
Jan 13, 2009, 4:26:23 AM1/13/09
to Google Web Toolkit
I have done a few tutorial on integrating the two technologies with
Spring also for a true web app:


Part One - http://eggsylife.blogspot.com/2007/10/well-this-tutorial-aims-at-helping.html
Part Two - http://eggsylife.blogspot.com/2007/11/hibernate-spring-google-web-toolkit.html
Part Three - http://eggsylife.blogspot.com/2008/02/hibernate-spring-google-web-toolkit.html
Part Four - http://eggsylife.blogspot.com/2008/09/hibernate-spring-google-web-toolkit.html
Part Five - http://eggsylife.blogspot.com/2008/11/hibernate-spring-and-gwt-for-gwt-15.html


Eggsy



On Jan 13, 12:24 am, Sumit Chandel <sumitchan...@google.com> wrote:
> Hi Dessorry,
>
> In terms of where to put your Hibernate code, you're most likely to get
> useful replies and information on the Hibernate site and discussion forum:
>
> Hibernate homepage:http://www.hibernate.org/
>
> About using your Hibernate objects in GWT - as you will discover by
> searching threads in this forum about the subject, you normally can't use
> Hibernate objects directly in GWT RPC because of the types used in Hibernate
> that aren't supported by GWT's emulated JRE. However, you can always create
> data transfer objects that mirror your Hibernate objects. These are regular
> POJOs that obey the constraints of the emulated JRE. In addition to this and
> other techniques you might find in a group search, you can also use the
> Gilead library which is designed for the purpose of integrating Hibernate
> with GWT.
>
> Chances are that since you're just getting started out with GWT, there are
> probably more than a few terms in the preceding paragraph that might have
> you scratching your head. Check out the links below for more info and feel
> free to post back if you have an additional questions.
>
> GWT emulated JRE:http://code.google.com/docreader/#p=google-web-toolkit-doc-1-5&s=goog...
>
> Gilead project:http://noon.gilead.free.fr/gilead/
>
> Hope that helps,
> -Sumit Chandel
>
Reply all
Reply to author
Forward
0 new messages