commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adrian Beech" <a.be...@bigpond.net.au>
Subject [DBCP] Example init servlet to set up a connection pool?
Date Fri, 05 Mar 2004 22:08:04 GMT
G'day folks,

Can anyone point me in the direction of where I might find examples of how
to put together a init servlet which would set up a connection pool?  The
server boffins alas do not allow us wee plebs to fiddle in Tomcat's
server.xml file so we need to set up our resources from within the
application itself.  I'm hoping to create and initialise the connection pool
resource and toss the reference into the JNDI name space using a servlet
that is fired up when the application is first kicked into life.  Parameters
such as the JDBC driver, connection string, user ID and password for the
data source will be derived from init params defined for the this servlet in
the web.xml file.

I've taken a glimpse at the manual pooling example from DBCP and noticed a
lack of try/catch blocks.  I guess it is this which is basically what I'm
trying to figure out... Where to catch and how to handle the caught
exceptions, etc.  I also assume that the code in this example can be dropped
into a servlet, try/catch blocks not withstanding, and that's that?

Thanks if you can help.

AB



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message