After some searching I found this: 
http://humblecode.blogspot.com/2009/05/gwt-16-using-jndi-datasource.html
. It worked for me on GWT 2.0 + MySQL.  Be careful when copy-pasting
the sample jetty-web.xml file, it uses "curling quotes"; also, don't
forget to add jetty-plus-*.jar and jetty-naming-*.jar to the build
path (read the post's comments for more info).

On Dec 1 2009, 4:22 pm, Steve <shar...@rationalblue.com> wrote:
> I am also very interested in this capability.  After spending this
> entire day researching the question and then attempting various
> combinations of code in web-jetty.xml configuration files I am not
> convinced it is possible yet.
>
> I have succeeded in deploying gwt code built using the instantiations
> plug-in to a glassfish server and accessing a mysql database.
> However, I would like to have the analogous capabilitiy on my
> development platform -- hence the need for the gwt hosted mode server
> (jetty) to be able to access datasources.
>
> The current version of jetty distributed with the latest gwt (1.7.1)
> hosted mode is jetty 6.1.11.  This version of jetty apparently did not
> incorporate jdbc support.  Rather, jdbc capability was distributed
> separately in another package (jetty.plus...?) for 6.1.11.   It
> appears that jetty 7.0 (which has migrated over to the eclipse
> foundation for future development) does incorporate a jdbc capability
> as part of its core distribution.  But this version of jetty is not
> available (yet) as part of gwt.  So it looks like we wait for gwt to
> upgrade to jetty 7.0.
>
> If someone has another idea for how to get the gwt hosted mode server
> to recognize and connect to datasources (specifically mysql), I'm all
> ears.
>
> On Oct 17, 4:49 pm, rernst <rerns...@gmail.com> wrote:
>
> > I am trying to implement a Datasource with the hosted mode server.
> > This has turned out to be very confusing. The otherwise excellent book
> > 'GWT in Practice' make reference to a Tomcat lite directory structure
> > which I am unable to find. Other references in this  group seem to
> > point at Jetty but I can't really find a jetty launcher script.
>
> > I should note that I am using the Instantiations Eclipse plugin but I
> > doubt that this plays into the runtime configuration. I am looking for
> > a context.xml file but cannot lcate anything besides the basic
> > web.xml.
>
> > I can make JDBC calls (JavaDB) via embedded and network driver just
> > fine but establishing a connection every time seems the wrong way to
> > go (am I mistaken). Instead I wanted to use connection pooling with a
> > Datasource as I would in a production environment.
>
> > Looking at some of the posts I am not the only one with this desire
> > but can't seem to find an answer that appears fitting.
>
> > Note that I am familiar on how to configure a Datasource in Tomcat but
> > the embedded server seems to work in mysterious ways ;-).
>
> > Any pointers on how to get this accomplished appreciated.

--

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.


Reply via email to