I'm using something similar to the following. I have it in context.xml in the META-INF directory of my webapp. I'm using Derby as a separate server though and using the IBM UDB JDBC driver. Note, this syntax is for Tomcat 5.5. It's different for earlier versions.

<Context>
<Resource name="jdbc/mydatabase"
auth="Container"
type="javax.sql.DataSource"
driverClassName="com.ibm.db2.jcc.DB2Driver"
url="jdbc:derby:net://localhost:1527/mydatabase;create=true:retrieveMessagesFromServerOnGetMessage=true;"
username="myuser"
password="mypassword"
maxActive="5"
maxIdle="5"
maxWait="60000"
validationQuery="VALUES(1)"
removeAbandoned="true"
removeAbandonedTimeout="60"
logAbandoned="true"/>
</Context>

Jon

----- Original Message ----- From: "Ravi BRavi" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Sunday, February 20, 2005 8:07 PM
Subject: Tomcat / derby connection pool



Hi:

I am new to both tomcat and derby - I am very familiar with weblogic and oracle.
I would like to create a database connection pool for a web application (embedded model - tomcat and derby in the same jvm - I am following the fortune tutorial example).
Is there an example of the steps / syntax (server.xml) for "jdbc connection pool" for tomcat / derby?


Thanks
-Ravi





Reply via email to