Re: GWT Hibernate Project Structure

2010-05-27 Thread Maurice Nee
Thanks Yau,

That would be great. Any info you could give me on how you setup your
project would be great. Are you using Eclipse? Also, is it the correct
procedure to place your Hibernate jars and dependencies in the war/WEB-
INF/lib directory and then add them to the build path?

Thanks for your help!

On May 26, 9:34 pm, Yau  wrote:
> I haven't tried Maven but I'm using GWT + Hibernate3 + Gilead.  It's
> very difficult to setup Gilead as the example provided by GWT is very
> very outdated and no longer compatible.  It took me 2 days to figure
> out how to set it up with the correct jar, import path and syntax.  If
> you're still interested in Gilead, I can provide some info.
>
> On May 25, 9:38 pm, Maurice Nee  wrote:
>
>
>
> > Thanks Gabriel,
>
> > I've read differing opinions on whether client and server code should
> > be split into two projects. At this point,
> > I really don't care which about which approach I use as long as I get
> > something up and running that is error
> > free. Could someone explain to me a specific procedure for setting up
> > a GWT + Maven2 + Hibernate3
> >projectin Eclipse? For instance, if I were to use only oneproject,
> > do I create a new GWTprojectwith the
> > GWT Eclipse plugin and then modify its directorystructureto conform
> > to Maven's standard directory layout?
> > Or, do I create a Mavenprojectwith the m2eclipse plugin and then
> > enable GWT in thatproject? Frankly, I'm
> > not sure where the best place to start is. This is my firstproject
> > using multiple technologies together, and
> > although I feel like I understand a good deal of how these
> > technologies work individually, I don't understand
> > how to make them work together. Any help would be most appreciated.
>
> > On May 22, 10:07 am, Gabriel  wrote:
>
> > > Hi,
>
> > > Do you have a reason for splitting the application into two projects?
> > > If not, there is nothing preventing you from using a singleproject
> > > for both client and server. If you do need to have two projects, you
> > > can use two (server and client) or three (server, client and common)
> > > modules under one mavenprojectand define the dependencies among them
> > > (if you hadn't used Maven, you could have used the IDE to define the
> > > dependencies between projects). I suggest you read the documentation
> > > here:http://code.google.com/eclipse/docs/users_guide.html
>
> > > On May 21, 6:20 am, Maurice Nee  wrote:
>
> > > > Hi,
>
> > > > This is my first ever forum post. I really need some help with
> > > > understanding how to setup aGWT2.0 Hibernate3project. I understand
> > > > theGWTRPC mechanism and the problems with serializingHibernate
> > > > POJOs. I would prefer to use DTO's rather than Gilead or Dozer. So
> > > > far, I have aHibernateProject built with Maven2 in Eclipse using the
> > > > m2eclipse plugin and the HibernateTools plugin for Eclipse. I also
> > > > have aGWT2.0projectbuilt with theGWTplugin for Eclipse. I'm
> > > > using MySql as the RDBMS. What I don't understand is how to setup,
> > > > configure, and deploy the two projects in such a way that they can
> > > > communicate with each other.
>
> > > > Let's say with the above setup, I'm trying to persist a Person object
> > > > that has only an id, and a name as fields. In myHibernateproject, I
> > > > would create a Person.hbm.xmlHibernatemapping document, and then
> > > > generate the correspondingHibernateJava POJO and MySql table. Then,
> > > > in myGWTproject, I would create a serializable PersonDTO.java class
> > > > that can be sent 'across the wire' to and from the server viaGWTRPC.
> > > > Then, for simplicity's sake, let's say that in the client package of
> > > > myGWTproject I create a CreatePersonService.java interface and a
> > > > CreatePersonServiceAsync.java interface with one method, void
> > > > createPerson(). I would then need a CreatePersonServiceImp.java class
> > > > on the server side that implements createPerson(). Fine, but here's
> > > > where I get confused.
>
> > > > If the createPersonServiceImp.java class is going to transform a
> > > > PersonDTO.java class into itsHibernatePOJO equivalent, then it needs
> > > > to utilize classes from both myGWTEclipseprojectandHibernate
> > > > Eclipseproject. So whichprojectdo I put it in? It needs to have
> > > > access toGWTclasses like PersonDTO, AsyncCallback and other RPC
> > > > classes. It also needs access toHibernateclasses like
> > > > SessionFactory, Transaction, etc. So it needs to have access to myGWT
> > > > jars andHibernatejars which are in two separate projects. How do do
> > > > I link them so that CreatePersonServiceImp.java has access to all the
> > > > libraries it needs. Finally, how do I correctly merge both of these
> > > > projects into one WAR file for deploying onto a server? Or am I way
> > > > off track?
>
> > > > --
> > > > You received this message because you are subscribed to the Google 
> > > > Groups "Google Web Toolkit" group.
> > > > To post to t

Re: GWT Hibernate Project Structure

2010-05-27 Thread Yau
I haven't tried Maven but I'm using GWT + Hibernate3 + Gilead.  It's
very difficult to setup Gilead as the example provided by GWT is very
very outdated and no longer compatible.  It took me 2 days to figure
out how to set it up with the correct jar, import path and syntax.  If
you're still interested in Gilead, I can provide some info.

On May 25, 9:38 pm, Maurice Nee  wrote:
> Thanks Gabriel,
>
> I've read differing opinions on whether client and server code should
> be split into two projects. At this point,
> I really don't care which about which approach I use as long as I get
> something up and running that is error
> free. Could someone explain to me a specific procedure for setting up
> a GWT + Maven2 + Hibernate3
> project in Eclipse? For instance, if I were to use only one project,
> do I create a new GWT project with the
> GWT Eclipse plugin and then modify its directory structure to conform
> to Maven's standard directory layout?
> Or, do I create a Maven project with the m2eclipse plugin and then
> enable GWT in that project? Frankly, I'm
> not sure where the best place to start is. This is my first project
> using multiple technologies together, and
> although I feel like I understand a good deal of how these
> technologies work individually, I don't understand
> how to make them work together. Any help would be most appreciated.
>
> On May 22, 10:07 am, Gabriel  wrote:
>
>
>
>
>
> > Hi,
>
> > Do you have a reason for splitting the application into two projects?
> > If not, there is nothing preventing you from using a single project
> > for both client and server. If you do need to have two projects, you
> > can use two (server and client) or three (server, client and common)
> > modules under one maven project and define the dependencies among them
> > (if you hadn't used Maven, you could have used the IDE to define the
> > dependencies between projects). I suggest you read the documentation
> > here:http://code.google.com/eclipse/docs/users_guide.html
>
> > On May 21, 6:20 am, Maurice Nee  wrote:
>
> > > Hi,
>
> > > This is my first ever forum post. I really need some help with
> > > understanding how to setup aGWT2.0 Hibernate3 project. I understand
> > > theGWTRPC mechanism and the problems with serializingHibernate
> > > POJOs. I would prefer to use DTO's rather than Gilead or Dozer. So
> > > far, I have aHibernateProject built with Maven2 in Eclipse using the
> > > m2eclipse plugin and the HibernateTools plugin for Eclipse. I also
> > > have aGWT2.0 project built with theGWTplugin for Eclipse. I'm
> > > using MySql as the RDBMS. What I don't understand is how to setup,
> > > configure, and deploy the two projects in such a way that they can
> > > communicate with each other.
>
> > > Let's say with the above setup, I'm trying to persist a Person object
> > > that has only an id, and a name as fields. In myHibernateproject, I
> > > would create a Person.hbm.xmlHibernatemapping document, and then
> > > generate the correspondingHibernateJava POJO and MySql table. Then,
> > > in myGWTproject, I would create a serializable PersonDTO.java class
> > > that can be sent 'across the wire' to and from the server viaGWTRPC.
> > > Then, for simplicity's sake, let's say that in the client package of
> > > myGWTproject I create a CreatePersonService.java interface and a
> > > CreatePersonServiceAsync.java interface with one method, void
> > > createPerson(). I would then need a CreatePersonServiceImp.java class
> > > on the server side that implements createPerson(). Fine, but here's
> > > where I get confused.
>
> > > If the createPersonServiceImp.java class is going to transform a
> > > PersonDTO.java class into itsHibernatePOJO equivalent, then it needs
> > > to utilize classes from both myGWTEclipse project andHibernate
> > > Eclipse project. So which project do I put it in? It needs to have
> > > access toGWTclasses like PersonDTO, AsyncCallback and other RPC
> > > classes. It also needs access toHibernateclasses like
> > > SessionFactory, Transaction, etc. So it needs to have access to myGWT
> > > jars andHibernatejars which are in two separate projects. How do do
> > > I link them so that CreatePersonServiceImp.java has access to all the
> > > libraries it needs. Finally, how do I correctly merge both of these
> > > projects into one WAR file for deploying onto a server? Or am I way
> > > off track?
>
> > > --
> > > You received this message because you are subscribed to the Google Groups 
> > > "Google Web Toolkit" group.
> > > To post to this group, send email to google-web-tool...@googlegroups.com.
> > > To unsubscribe from this group, send email to 
> > > google-web-toolkit+unsubscr...@googlegroups.com.
> > > For more options, visit this group 
> > > athttp://groups.google.com/group/google-web-toolkit?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Google Web Toolkit" group.
> > To post to this group, send email to google-web-tool...@googl

Re: GWT Hibernate Project Structure

2010-05-25 Thread Maurice Nee
Thanks Gabriel,

I've read differing opinions on whether client and server code should
be split into two projects. At this point,
I really don't care which about which approach I use as long as I get
something up and running that is error
free. Could someone explain to me a specific procedure for setting up
a GWT + Maven2 + Hibernate3
project in Eclipse? For instance, if I were to use only one project,
do I create a new GWT project with the
GWT Eclipse plugin and then modify its directory structure to conform
to Maven's standard directory layout?
Or, do I create a Maven project with the m2eclipse plugin and then
enable GWT in that project? Frankly, I'm
not sure where the best place to start is. This is my first project
using multiple technologies together, and
although I feel like I understand a good deal of how these
technologies work individually, I don't understand
how to make them work together. Any help would be most appreciated.

On May 22, 10:07 am, Gabriel  wrote:
> Hi,
>
> Do you have a reason for splitting the application into two projects?
> If not, there is nothing preventing you from using a single project
> for both client and server. If you do need to have two projects, you
> can use two (server and client) or three (server, client and common)
> modules under one maven project and define the dependencies among them
> (if you hadn't used Maven, you could have used the IDE to define the
> dependencies between projects). I suggest you read the documentation
> here:http://code.google.com/eclipse/docs/users_guide.html
>
> On May 21, 6:20 am, Maurice Nee  wrote:
>
>
>
>
>
> > Hi,
>
> > This is my first ever forum post. I really need some help with
> > understanding how to setup aGWT2.0 Hibernate3 project. I understand
> > theGWTRPC mechanism and the problems with serializingHibernate
> > POJOs. I would prefer to use DTO's rather than Gilead or Dozer. So
> > far, I have aHibernateProject built with Maven2 in Eclipse using the
> > m2eclipse plugin and the HibernateTools plugin for Eclipse. I also
> > have aGWT2.0 project built with theGWTplugin for Eclipse. I'm
> > using MySql as the RDBMS. What I don't understand is how to setup,
> > configure, and deploy the two projects in such a way that they can
> > communicate with each other.
>
> > Let's say with the above setup, I'm trying to persist a Person object
> > that has only an id, and a name as fields. In myHibernateproject, I
> > would create a Person.hbm.xmlHibernatemapping document, and then
> > generate the correspondingHibernateJava POJO and MySql table. Then,
> > in myGWTproject, I would create a serializable PersonDTO.java class
> > that can be sent 'across the wire' to and from the server viaGWTRPC.
> > Then, for simplicity's sake, let's say that in the client package of
> > myGWTproject I create a CreatePersonService.java interface and a
> > CreatePersonServiceAsync.java interface with one method, void
> > createPerson(). I would then need a CreatePersonServiceImp.java class
> > on the server side that implements createPerson(). Fine, but here's
> > where I get confused.
>
> > If the createPersonServiceImp.java class is going to transform a
> > PersonDTO.java class into itsHibernatePOJO equivalent, then it needs
> > to utilize classes from both myGWTEclipse project andHibernate
> > Eclipse project. So which project do I put it in? It needs to have
> > access toGWTclasses like PersonDTO, AsyncCallback and other RPC
> > classes. It also needs access toHibernateclasses like
> > SessionFactory, Transaction, etc. So it needs to have access to myGWT
> > jars andHibernatejars which are in two separate projects. How do do
> > I link them so that CreatePersonServiceImp.java has access to all the
> > libraries it needs. Finally, how do I correctly merge both of these
> > projects into one WAR file for deploying onto a server? Or am I way
> > off track?
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Google Web Toolkit" group.
> > To post to this group, send email to google-web-tool...@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > google-web-toolkit+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/google-web-toolkit?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to 
> google-web-toolkit+unsubscr...@googlegroups.com.
> For more options, visit this group 
> athttp://groups.google.com/group/google-web-toolkit?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://

Re: GWT Hibernate Project Structure

2010-05-22 Thread Gabriel
Hi,

Do you have a reason for splitting the application into two projects?
If not, there is nothing preventing you from using a single project
for both client and server. If you do need to have two projects, you
can use two (server and client) or three (server, client and common)
modules under one maven project and define the dependencies among them
(if you hadn't used Maven, you could have used the IDE to define the
dependencies between projects). I suggest you read the documentation
here: http://code.google.com/eclipse/docs/users_guide.html

On May 21, 6:20 am, Maurice Nee  wrote:
> Hi,
>
> This is my first ever forum post. I really need some help with
> understanding how to setup a GWT 2.0 Hibernate3 project. I understand
> the GWT RPC mechanism and the problems with serializing Hibernate
> POJOs. I would prefer to use DTO's rather than Gilead or Dozer. So
> far, I have a Hibernate Project built with Maven2 in Eclipse using the
> m2eclipse plugin and the HibernateTools plugin for Eclipse. I also
> have a GWT 2.0 project built with the GWT plugin for Eclipse. I'm
> using MySql as the RDBMS. What I don't understand is how to setup,
> configure, and deploy the two projects in such a way that they can
> communicate with each other.
>
> Let's say with the above setup, I'm trying to persist a Person object
> that has only an id, and a name as fields. In my Hibernate project, I
> would create a Person.hbm.xml Hibernate mapping document, and then
> generate the corresponding Hibernate Java POJO and MySql table. Then,
> in my GWT project, I would create a serializable PersonDTO.java class
> that can be sent 'across the wire' to and from the server via GWT RPC.
> Then, for simplicity's sake, let's say that in the client package of
> my GWT project I create a CreatePersonService.java interface and a
> CreatePersonServiceAsync.java interface with one method, void
> createPerson(). I would then need a CreatePersonServiceImp.java class
> on the server side that implements createPerson(). Fine, but here's
> where I get confused.
>
> If the createPersonServiceImp.java class is going to transform a
> PersonDTO.java class into its Hibernate POJO equivalent, then it needs
> to utilize classes from both my GWT Eclipse project and Hibernate
> Eclipse project. So which project do I put it in? It needs to have
> access to GWT classes like PersonDTO, AsyncCallback and other RPC
> classes. It also needs access to Hibernate classes like
> SessionFactory, Transaction, etc. So it needs to have access to my GWT
> jars and Hibernate jars which are in two separate projects. How do do
> I link them so that CreatePersonServiceImp.java has access to all the
> libraries it needs. Finally, how do I correctly merge both of these
> projects into one WAR file for deploying onto a server? Or am I way
> off track?
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to 
> google-web-toolkit+unsubscr...@googlegroups.com.
> For more options, visit this group 
> athttp://groups.google.com/group/google-web-toolkit?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



GWT Hibernate Project Structure

2010-05-21 Thread Maurice Nee
Hi,

This is my first ever forum post. I really need some help with
understanding how to setup a GWT 2.0 Hibernate3 project. I understand
the GWT RPC mechanism and the problems with serializing Hibernate
POJOs. I would prefer to use DTO's rather than Gilead or Dozer. So
far, I have a Hibernate Project built with Maven2 in Eclipse using the
m2eclipse plugin and the HibernateTools plugin for Eclipse. I also
have a GWT 2.0 project built with the GWT plugin for Eclipse. I'm
using MySql as the RDBMS. What I don't understand is how to setup,
configure, and deploy the two projects in such a way that they can
communicate with each other.

Let's say with the above setup, I'm trying to persist a Person object
that has only an id, and a name as fields. In my Hibernate project, I
would create a Person.hbm.xml Hibernate mapping document, and then
generate the corresponding Hibernate Java POJO and MySql table. Then,
in my GWT project, I would create a serializable PersonDTO.java class
that can be sent 'across the wire' to and from the server via GWT RPC.
Then, for simplicity's sake, let's say that in the client package of
my GWT project I create a CreatePersonService.java interface and a
CreatePersonServiceAsync.java interface with one method, void
createPerson(). I would then need a CreatePersonServiceImp.java class
on the server side that implements createPerson(). Fine, but here's
where I get confused.

If the createPersonServiceImp.java class is going to transform a
PersonDTO.java class into its Hibernate POJO equivalent, then it needs
to utilize classes from both my GWT Eclipse project and Hibernate
Eclipse project. So which project do I put it in? It needs to have
access to GWT classes like PersonDTO, AsyncCallback and other RPC
classes. It also needs access to Hibernate classes like
SessionFactory, Transaction, etc. So it needs to have access to my GWT
jars and Hibernate jars which are in two separate projects. How do do
I link them so that CreatePersonServiceImp.java has access to all the
libraries it needs. Finally, how do I correctly merge both of these
projects into one WAR file for deploying onto a server? Or am I way
off track?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.