Hi, here is an example.
Server.xml <Context path="/creditel" docBase="creditel" debug="0" reloadable="true" crossContext="true"> <Resource name="jdbc/creditel" auth="Container" type ="javax.sql.DataSource"/> <ResourceParams name="jdbc/creditel"> <parameter><name>driverClassName</name> <value>COM.ibm.db2.jdbc.net.DB2Driver</value></parameter> <parameter><name>driverName</name> <value>jdbc:db2://URL/DATABASENAME</value></parameter> <parameter><name>user</name><value>USERNAME</value></parameter> <parameter><name>password</name><value>PASSWORD</value></parameter> <parameter><name>maxPoolSize</name><value>2</value></parameter> <parameter><name>loginTimeout</name><value>10</value></parameter> </ResourceParams> </Context> web.xml <resource-ref> <res-ref-name>jdbc/creditel</res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth>Container</res-auth> </resource-ref> Good luck, "Mark Muffett" <[EMAIL PROTECTED]> on 03/14/2002 04:18:13 AM Please respond to "Tomcat Users List" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> cc: Fax to: Subject: Re: jndi versus database connection pooling There's a lot to configure to get it to work. The coding side seems to be well documented, and there have been several instances posted here, but (as far as I can see) we're all working in the dark with server.xml. I've spent a lot of time trying to get database pooling to work with Postgresql, but I've failed and given up. I'd be interested to know what database/tomcat configurations anyone has got to work - with some sample server.xml fragments if possible. Mark ----- Original Message ----- From: "Craig R. McClanahan" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Thursday, March 14, 2002 6:51 AM Subject: Re: jndi versus database connection pooling > > > On Thu, 14 Mar 2002, Dave Whitla wrote: > > > Date: Thu, 14 Mar 2002 16:22:01 +1000 > > From: Dave Whitla <[EMAIL PROTECTED]> > > Reply-To: Tomcat Users List <[EMAIL PROTECTED]> > > To: Tomcat Users List <[EMAIL PROTECTED]> > > Subject: Re: jndi versus database connection pooling > > > > You will need to write a PooledDataSource implementation if your JDBC driver > > does not ship with one. > > AFAIK mm.mysql does not. > > > > But some one somewhere would have to have done it by now for their own > > project. > > > > Tomcat 4 includes a connection pool, and makes it available via JNDI. > All you need to supply the JDBC driver for your favorite database, and > configure the pool appropriately. Details are on the > "jndi-resources-howto.html" page of the Tomcat documentation webapp > (http://localhost:8080/tomcat-docs/). > > Craig > > > > > > ----- Original Message ----- > > From: "Soefara Redzuan" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Thursday, March 14, 2002 4:20 PM > > Subject: jndi versus database connection pooling > > > > > > > I am getting very confused. Is JDNI Tomcat's own builtin database pool > > > manager or must I still use a database conncetion pool manager such as the > > > one at www.javaexchange.com ? > > > > > > Really I would love to have the database connection URL and > > > username/password outside of my JSPs and in one place so JNDI looks best. > > > But I'd also like to use database connection pooling within my JSPs and > > > Servlets. How are people doing this with mysql ? > > > > > > Thank you, Soefara > > > > > > _________________________________________________________________ > > > Get your FREE download of MSN Explorer at > > http://explorer.msn.com/intl.asp. > > > > > > > > > -- > > > To unsubscribe: <mailto:[EMAIL PROTECTED]> > > > For additional commands: <mailto:[EMAIL PROTECTED]> > > > Troubles with the list: <mailto:[EMAIL PROTECTED]> > > > > > > > > > > > > > > > -- > > To unsubscribe: <mailto:[EMAIL PROTECTED]> > > For additional commands: <mailto:[EMAIL PROTECTED]> > > Troubles with the list: <mailto:[EMAIL PROTECTED]> > > > > > > > -- > To unsubscribe: <mailto:[EMAIL PROTECTED]> > For additional commands: <mailto:[EMAIL PROTECTED]> > Troubles with the list: <mailto:[EMAIL PROTECTED]> > -- To unsubscribe: <mailto:[EMAIL PROTECTED]> For additional commands: <mailto:[EMAIL PROTECTED]> Troubles with the list: <mailto:[EMAIL PROTECTED]> -- To unsubscribe: <mailto:[EMAIL PROTECTED]> For additional commands: <mailto:[EMAIL PROTECTED]> Troubles with the list: <mailto:[EMAIL PROTECTED]>