You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Securez <se...@teleline.es> on 2002/05/09 17:02:40 UTC

HELP needed!! About pooling support in tomcat

I have Installed Tomcat 4.0.3 in a linux box with a mysql database.
I have installed tryex jar file under common/lib
I get db working with this params:
in server.xml:
         <Context path="/test" docBase="test"
          debug="0">
         <Resource name="jdbc/EmployeeDB" auth="Container"
                         type="javax.sql.DataSource"/>
         <ResourceParams name="jdbc/EmployeeDB">
     <parameter>
         <name>user</name>
         <value>webuser</value>
     </parameter>
     <parameter>
         <name>password</name>
         <value>webuser</value>
     </parameter>
     <parameter>
         <name>driverClassName</name>
         <value>org.gjt.mm.mysql.Driver</value>
     </parameter>
     <parameter>
         <name>driverName</name>
         <value>jdbc:mysql://localhost/intranet</value>
     </parameter>
   </ResourceParams>
   </Context>

in webapps/test/WEB-INF/web.xml:
<resource-ref>
   <description>
     Resource reference to a factory for java.sql.Connection
     instances that may be used for talking to a particular
     database that is configured in the server.xml file.
   </description>
   <res-ref-name>
     jdbc/EmployeeDB
   </res-ref-name>
   <res-type>
     javax.sql.DataSource
   </res-type>
   <res-auth>
     Container
   </res-auth>
</resource-ref>

with this i get the database working in a simple jsp that i make, but every 
time i launch the jsp page, a new connection to de database are made, what 
i can solve this, to make a pool of initial connection and reuse them??
Where i can found example configuration files to get this work?

Regards.


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>