tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nabruphonic <stylopho...@gmx.de>
Subject Tomcat: JNDI and Google Webtoolkit
Date Wed, 25 Jun 2008 15:08:07 GMT

Hi!

I've got a problem with my project. Here a short summary about what it is:

I wrote a web application that periodically reads out a database and shows
these information in a visual way (on a google map or a chart...).
The gwt-project and the mysql-database are on two different virtual machines
on the same computer (one is a windows vm, the other is a ubuntu vm).
Now I want to bind the gwt-project into tomcat. Therefore I set up
everything on client and server site and the communication between both
works.
My problem is the communication between the server-code and the
mysql-database. JNDI is the best way to do something like that, but I am not
very deep incorporated in this sector (tomcat). I followed some how-tos, but
I can't get my communication work.

I hope you can help me!

Here are the tools I am using:
- Apache Tomcat 5.5
- Google Webtoolkit 1.4 + GWT-Ext (auf Windows XP)
- MySQL 4.1 (auf Ubuntu)

I attempted the following things:
- copy mysql-connector-java-5.1.6-bin.jar into <TOMCAT>/server/lib
- added to <TOMCAT>/conf/context.xml the following:
Code:

      <Resource name="jdbc/eco_test" auth="Container"
type="javax.sql.DataSource" removeAbandoned="true"
         removeAbandonedTimeout="30" maxActive="100" maxIdle="30"
maxWait="10000" username="test2"
         password="test" driverClassName="com.mysql.jdbc.Driver"
         url="jdbc:mysql://192.168.7.136/eco_test" />

- added to <TOMCAT>/webapps/<MYPROJECT>/WEB-INF/web.xml the following:
Code:

      <web-app>
      	<resource-ref>
            <description>DB Connection</description>
            <res-ref-name>jdbc/eco_test</res-ref-name>
            <res-type>javax.sql.DataSource</res-type>
            <res-auth>Container</res-auth>
        </resource-ref>
      	[...]
      </web-app>

I think I need to add somewhere a connector? Like this:
Code:

<Connector port="80" maxHttpHeaderSize="8192" maxProcessors="150"
   maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
   enableLookups="false" redirectPort="8443" acceptCount="150"
   connectionTimeout="20000" disableUploadTimeout="true" />

I hope you can help me, I thought I made everythink right, but I can't get
the communication work.

Thanks a lot!
-- 
View this message in context: http://www.nabble.com/Tomcat%3A-JNDI-and-Google-Webtoolkit-tp18114801p18114801.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message