tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Securez <secu...@teleline.es>
Subject RE: HELP needed!! About pooling support in tomcat
Date Fri, 10 May 2002 09:58:19 GMT
when i put javax.sql.ConnectionPoolDatasource, i get this error when qet 
the initial context:
javax.naming.NamingException: Cannot create resource instance

but when i use javax.sql.Datasource it works fine!!

I need help to put a connection pooled in tomcat, i can't find any example 
of do this.
Any help are apreciated.

:(

Regards.

At 10.04 9/5/02 -0500, you wrote:
>i think, i think ... because i cannot even get as far as you that, instead
>of javax.sql.DataSource try javax.sql.ConnectionPoolDatasource. Of course i
>could be way off
>
>-----Original Message-----
>From: Securez [mailto:securez@teleline.es]
>Sent: Thursday, May 09, 2002 10:03 AM
>To: tomcat-user@jakarta.apache.org
>Subject: 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:
><mailto:tomcat-user-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail:
><mailto:tomcat-user-help@jakarta.apache.org>
>
>--
>To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message