Re: SerializationException: Why with default Constructor -yes! implements Serializable- yes!

2011-01-26 Thread Maurice Nee
Hey,

That's weird tho. Serializable and IsSerializable should both work...
If Serializable does not work and IsSerializable does, you still might
have a problem in that your serialization policy file, which is
created at compile time, might not be getting generated correctly.
When you use IsSerializable, the policy file is not consulted. Like I
said, your code above works on my machine. Did you test using
Serializable and recompiling?

-Lyden

On Jan 23, 11:21 pm, Shawn Brown  wrote:
> Hi,
>
> Why do I get "SerializationException: Type 'IdKeyHolder' was not
> included in the set of types which can be serialized by this
> SerializationPolicy or its Class object could not be loaded. For
> security purposes, this type will not be serialized"
>
> import java.io.Serializable;
> import java.util.Arrays;
> import java.util.Iterator;
> import java.util.LinkedList;
>
> public class IdKeyHolder implements Serializable{
>
>         public IdKeyHolder() {
>                 super();
>         }
>
>         public static final long serialVersionUID = -6739090309443601098L;
>
>         LinkedList keys = new LinkedList();
>
> }
>
> Help is greatly appreciated!
>
> Shawn

-- 
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-toolkit@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.



Re: SerializationException: Why with default Constructor -yes! implements Serializable- yes!

2011-01-23 Thread Maurice Nee
Hey,

Your code looks good. Just to be sure, I created a sample project, and
tested it. It works. So...something must be out of sync with your
build.
Have you tried recompiling you project and then restarting the
development server?

-Lyden

On Jan 23, 11:21 pm, Shawn Brown  wrote:
> Hi,
>
> Why do I get "SerializationException: Type 'IdKeyHolder' was not
> included in the set of types which can be serialized by this
> SerializationPolicy or its Class object could not be loaded. For
> security purposes, this type will not be serialized"
>
> import java.io.Serializable;
> import java.util.Arrays;
> import java.util.Iterator;
> import java.util.LinkedList;
>
> public class IdKeyHolder implements Serializable{
>
>         public IdKeyHolder() {
>                 super();
>         }
>
>         public static final long serialVersionUID = -6739090309443601098L;
>
>         LinkedList keys = new LinkedList();
>
> }
>
> Help is greatly appreciated!
>
> Shawn

-- 
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-toolkit@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.



Re: GWT + GILEAD + AXIS2 POJO PROBLEM

2011-01-22 Thread Maurice Nee
Hey,

Probably a dumb question, but why do you need to use Axis2? I don't
have any experience with it, but I built a GWT app that uses Gilead to
deal with Hibernate/GWT serialization issues and was able to serialize
my POJOs just fine using GWTs built in RPC mechanism.

-Lyden

On Jan 19, 2:56 pm, bond  wrote:
> Hi,
> I've a project in witch I'm using Gwt 2.1.1 with Gilead 1.3.3,
> Hibernate 3.3 and Axi2.
> I created a web service that returns gilead pojo object of domain. The
> server seems return the object but it doesn't arrive on the client
> that go to org.apache.axis2.AxisFault: Read timed out. If I use a
> simple bean that doesn't extends LightEntity it works!! There is a
> manner to return from web service a gilead pojo object serializable
> that doesn't create this problem?
>
> Thanks!
>
> Best regards

-- 
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-toolkit@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.



Re: GWT Connection to DB

2011-01-19 Thread Maurice Nee
Hey Again,

GWT is client side only. There are no GWT widget that have built in
server side functionality. Check out Apache Struts, Apache Wicket, and
Apache Click.

Here's a great resource for comparing web frameworks. Scroll to the
java table and note how little GWT provides.

http://en.wikipedia.org/wiki/Comparison_of_web_application_frameworks

-Lyden

On Jan 19, 1:38 am, Saurav Sarkar  wrote:
> Hi All,
>
> I am new to GWT.I installed the google plug-in for Eclipse and also
> the Window builder.
>
> Now i want my application to connect to Database.Is there any GWT form
> widget kind of thing which will automatically take care of my form
> submissions to the database.Is something available in the Window
> Builder  also ?
>
> Or else what is the best practice being used in GWT code while
> connecting to DB ?..I even had a look at the GWT-Hibernate libraries.
>
> Appreciate your response.
>
> Thanks and Regards,
> Saurav

-- 
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-toolkit@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.



Re: GWT Connection to DB

2011-01-19 Thread Maurice Nee
Hey,

You can use GWT RPC to handle server side logic like connecting to and
interacting with a database. Be warned, if you choose to use Hibernate
as an ORM, there is a steep learning curve. Hibernate may drive you
crazy in the beginning, but once you understand all the unintuitive
nuances, it rocks. Still GWT is not immediately well suited to work
with Hibernate. Since everything on the client side of a GWT
application is compiled into JavaScript, there are serialization
problems when sending Hibernate objects to the client side. If you
want to use Hibernate, I suggest also using Gilead to solve this
problems. However, again since the client side is all compiled into
JavaScript, no matter what you do, you will not be able to invoke any
Hibernate related functionality on the client side. Remember, you can
only reference classes on the client side that are implemented in
GWT's JRE Emulation Reference:

http://code.google.com/webtoolkit/doc/latest/RefJreEmulation.html

You're in for a very long haul if you choose to use Hibernate. It's
very sophisticated, but you might want to start out with a simpler
setup such as using JSON / PHP / MySQL. Instead of using GWT RPC, just
make direct Asynchronous HTTP requests for server side PHP using GWT's
RequestBuilder object. Your PHP files will connect to and interact
with the database. PHP has numerous built in functions for interacting
with a MySQL database.

Hope that helps!
-Lyden

On Jan 19, 1:38 am, Saurav Sarkar  wrote:
> Hi All,
>
> I am new to GWT.I installed the google plug-in for Eclipse and also
> the Window builder.
>
> Now i want my application to connect to Database.Is there any GWT form
> widget kind of thing which will automatically take care of my form
> submissions to the database.Is something available in the Window
> Builder  also ?
>
> Or else what is the best practice being used in GWT code while
> connecting to DB ?..I even had a look at the GWT-Hibernate libraries.
>
> Appreciate your response.
>
> Thanks and Regards,
> Saurav

-- 
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-toolkit@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.



Deployment: Choosing a Servlet Container and a Comet Framework

2010-11-22 Thread Maurice Nee
Hi all,

I'm in the final stages of developing business management software for
the company I work for. My project uses GWT 2.0 (might upgrade to
2.1), Hibernate 3.6, MySQL 5.1.46, and Gilead for GWT/Hibernate
Serialization. Now it's time for me to start thinking about
deployment, and I was hoping to solicit some advice on which Servlet
Container to use. I don't have any experience with setting up and
configuring a servlet container. Also I will not be using App Engine.
Their website and this app will reside on GoDaddy's servers.

I'm under a time crunch, but I'm also still considering replacing some
client/server polling with a Comet (Server/Push) framework. Any advice
on which framework to use would be most appreciated. Debating between:

 1. gwteventservice
 2. gwt-comet
 3. gwt-comet-streamhub
 4. rocket-gwt


Lastly this is probably a very stupid question, but is there a way to
package my app up along with the servlet container from GWT's embedded
Jetty Server, and just host that container rather than go through the
process of setting up and configuring a container like Tomcat? I'm
guessing there are a number of reasons why, even if I could, I
wouldn't want to do this...

All in all, whichever container is the quickest and easiest to setup
and configure for a beginner is going to be my choice. Any thoughts?

-- 
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.



Mysql Connector/J

2010-08-05 Thread Maurice Nee
Can someone explain to me how to get JDBC to connect to MySQL in my
GWT project. Where do I put the mysql-connector-java jar? In war/WEB-
INF/lib? What connection url would I have to supply to the
DriverManager to connect to the database in development mode using the
embedded jetty server?

-- 
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.



Re: Reflection: Get Variable Name

2010-08-05 Thread Maurice Nee
Thanks again for the reply. I was planning to send the generated query
to a PHP file on the server that connects to a MySQL database and
executes the query, but point taken about the security hole. So how
would I go about doing this then? Can I just make regular Java classes
in the server package of my GWT project and then use RPC to send my
DTOs across the wire to those classes where I can use Reflection to
analyze the DTOs and build queries from them? Then I guess I would use
JDBC to execute the query... Also, will I need to setup a servlet
container like Tomcat on the server?

On Aug 5, 6:46 pm, Ian Petersen  wrote:
> As GWT is client-side only it has no direct access to any SQL database
> (modulo whatever I don't know about client-side storage in HTML5) so
> generating SQL "in GWT" is either a waste of time or a security hole
> waiting to happen.  Your server should definitely not be trusting SQL
> generated on the client!
>
> If you want to do what you've described, you need to do it on the
> server, in regular Java, where reflection works as usual.
>
> Ian
>
>
>
> On Thu, Aug 5, 2010 at 3:06 PM, Maurice Nee  wrote:
> > Thanks for the reply. Generators seem like a lot to swallow. I'm
> > trying to introspect a set of DTO's that I want to marshall to and
> > from a database. I would like to be able to make use of the convention
> > over configuration principle and have my DTO class names = table names
> > in the database and have my Java field names = field names in the
> > database. Then I was hoping to use reflection to dynamically build SQL
> > queries based on the given DTO. Am I out of luck with GWT?
>
> > Also, I don't have time for the Hibernate learning curve. Hibernate +
> > GWT + Gilead + Maven + Spring = Will not meet deadline :)
>
> > On Aug 5, 5:20 pm, Ian Petersen  wrote:
> >> At run time, it's impossible.  At compile time, you use the generator
> >> API.  Back in the GWT 1.5 time frame it wasn't well documented but
> >> that may have changed since.
>
> >> Ian
>
> >> On Thu, Aug 5, 2010 at 1:42 PM, Maurice Nee  wrote:
> >> > How can I get a variable's name in GWT?
>
> >> > How can I get a collection of declared variables in a class in GWT?
>
> >> > --
> >> > 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://groups.google.com/group/google-web-toolkit?hl=en.



Re: Reflection: Get Variable Name

2010-08-05 Thread Maurice Nee
Also, it seems like people have made GWT Reflection Frameworks. I
found one named GWT Reflection. Then there's gwt-ent or SmartGWT I
guess. Any thoughts on using one of these routes?

On Aug 5, 6:06 pm, Maurice Nee  wrote:
> Thanks for the reply. Generators seem like a lot to swallow. I'm
> trying to introspect a set of DTO's that I want to marshall to and
> from a database. I would like to be able to make use of the convention
> over configuration principle and have my DTO class names = table names
> in the database and have my Java field names = field names in the
> database. Then I was hoping to use reflection to dynamically build SQL
> queries based on the given DTO. Am I out of luck with GWT?
>
> Also, I don't have time for the Hibernate learning curve. Hibernate +
> GWT + Gilead + Maven + Spring = Will not meet deadline :)
>
> On Aug 5, 5:20 pm, Ian Petersen  wrote:
>
>
>
> > At run time, it's impossible.  At compile time, you use the generator
> > API.  Back in the GWT 1.5 time frame it wasn't well documented but
> > that may have changed since.
>
> > Ian
>
> > On Thu, Aug 5, 2010 at 1:42 PM, Maurice Nee  wrote:
> > > How can I get a variable's name in GWT?
>
> > > How can I get a collection of declared variables in a class in GWT?
>
> > > --
> > > 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.



Re: Database and GWT

2010-08-05 Thread Maurice Nee
Sorry for the broken link. Here you go
http://code.google.com/webtoolkit/articles/using_gwt_with_hibernate.html

On Aug 5, 6:20 pm, Maurice Nee  wrote:
> You have a couple of options:
> 1. Hibernate (or some other ORM tool)
> 2. JDBC
> 3. PHP and JSON
>
> Be prepared, the Hibernate learning curve is substantial. If you use
> Eclipse, you will need to install a slew of plugins for integrating
> Hibernate and whichever build tool you pefer, (Maven, Ant, etc.). Then
> you will need to address the Hibernate GWT Serialization issues. This
> is pretty much the best article on using the two together, but
> unfortunately it does not address how to setup your project.  href="http://code.google.com/webtoolkit/articles/
> using_gwt_with_hibernate.html">Using GWT and Hibernate
>
> I have not used JDBC with GWT, but I think you will need a JRE on your
> server.
>
> PHP and JSON is the easiest to get up and running. There are a number
> of tutorials online on GWT + PHP + MySQL
>
> On Aug 5, 5:56 pm, Diego Venuzka  wrote:
>
>
>
> > Hi!
> > After some hours without sleep to solve my compilation problem, i stop in
> > another problem. I'll need to insert data in database, and how GWT can help
> > with this? Or i can insert using the "tradicional method" with Java?
> > Thanks =)
>
> > --
> > Diego Venuzka

-- 
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.



Re: Database and GWT

2010-08-05 Thread Maurice Nee
You have a couple of options:
1. Hibernate (or some other ORM tool)
2. JDBC
3. PHP and JSON

Be prepared, the Hibernate learning curve is substantial. If you use
Eclipse, you will need to install a slew of plugins for integrating
Hibernate and whichever build tool you pefer, (Maven, Ant, etc.). Then
you will need to address the Hibernate GWT Serialization issues. This
is pretty much the best article on using the two together, but
unfortunately it does not address how to setup your project. http://code.google.com/webtoolkit/articles/
using_gwt_with_hibernate.html">Using GWT and Hibernate

I have not used JDBC with GWT, but I think you will need a JRE on your
server.

PHP and JSON is the easiest to get up and running. There are a number
of tutorials online on GWT + PHP + MySQL

On Aug 5, 5:56 pm, Diego Venuzka  wrote:
> Hi!
> After some hours without sleep to solve my compilation problem, i stop in
> another problem. I'll need to insert data in database, and how GWT can help
> with this? Or i can insert using the "tradicional method" with Java?
> Thanks =)
>
> --
> Diego Venuzka

-- 
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.



Re: Reflection: Get Variable Name

2010-08-05 Thread Maurice Nee
Thanks for the reply. Generators seem like a lot to swallow. I'm
trying to introspect a set of DTO's that I want to marshall to and
from a database. I would like to be able to make use of the convention
over configuration principle and have my DTO class names = table names
in the database and have my Java field names = field names in the
database. Then I was hoping to use reflection to dynamically build SQL
queries based on the given DTO. Am I out of luck with GWT?

Also, I don't have time for the Hibernate learning curve. Hibernate +
GWT + Gilead + Maven + Spring = Will not meet deadline :)

On Aug 5, 5:20 pm, Ian Petersen  wrote:
> At run time, it's impossible.  At compile time, you use the generator
> API.  Back in the GWT 1.5 time frame it wasn't well documented but
> that may have changed since.
>
> Ian
>
>
>
> On Thu, Aug 5, 2010 at 1:42 PM, Maurice Nee  wrote:
> > How can I get a variable's name in GWT?
>
> > How can I get a collection of declared variables in a class in GWT?
>
> > --
> > 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.



Reflection: Get Variable Name

2010-08-05 Thread Maurice Nee
How can I get a variable's name in GWT?

How can I get a collection of declared variables in a class in GWT?

-- 
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.



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
&g

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

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.