You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Soefara Redzuan <so...@hotmail.com> on 2002/03/14 07:20:04 UTC

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:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: jndi versus database connection pooling

Posted by Mark Muffett <ma...@muffett.net>.
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" <cr...@apache.org>
To: "Tomcat Users List" <to...@jakarta.apache.org>
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 <da...@nationalmortgage.com.au>
> > Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> > To: Tomcat Users List <to...@jakarta.apache.org>
> > 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" <so...@hotmail.com>
> > To: <to...@jakarta.apache.org>
> > 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:   <ma...@jakarta.apache.org>
> > > For additional commands: <ma...@jakarta.apache.org>
> > > Troubles with the list: <ma...@jakarta.apache.org>
> > >
> > >
> > >
> >
> >
> > --
> > To unsubscribe:   <ma...@jakarta.apache.org>
> > For additional commands: <ma...@jakarta.apache.org>
> > Troubles with the list: <ma...@jakarta.apache.org>
> >
> >
>
>
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>
>


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: jndi versus database connection pooling

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Thu, 14 Mar 2002, Dave Whitla wrote:

> Date: Thu, 14 Mar 2002 16:22:01 +1000
> From: Dave Whitla <da...@nationalmortgage.com.au>
> Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> To: Tomcat Users List <to...@jakarta.apache.org>
> 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" <so...@hotmail.com>
> To: <to...@jakarta.apache.org>
> 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:   <ma...@jakarta.apache.org>
> > For additional commands: <ma...@jakarta.apache.org>
> > Troubles with the list: <ma...@jakarta.apache.org>
> >
> >
> >
>
>
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>
>
>


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: jndi versus database connection pooling

Posted by Dave Whitla <da...@nationalmortgage.com.au>.
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.


----- Original Message -----
From: "Soefara Redzuan" <so...@hotmail.com>
To: <to...@jakarta.apache.org>
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:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>
>
>
>


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>