You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by Ravi BRavi <ra...@hotmail.com> on 2005/02/21 03:07:11 UTC
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
Re: Tomcat / derby connection pool
Posted by Jonathan Eric Miller <je...@uchicago.edu>.
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" <ra...@hotmail.com>
To: <de...@db.apache.org>
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
>
>