struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <craig...@apache.org>
Subject Re: db connection pooling
Date Mon, 07 Jul 2003 16:17:16 GMT


On Mon, 7 Jul 2003 jailani.s@polaris.co.in wrote:

> Date: Mon, 7 Jul 2003 10:09:08 +0530
> From: jailani.s@polaris.co.in
> Reply-To: Struts Users Mailing List <struts-user@jakarta.apache.org>
> To: struts-user@jakarta.apache.org
> Subject: db connection pooling
>
> Hi,
>
> Is there any ways to achieve db connection pooling and access of such
> pooled connection though jndi in struts action classes.

JNDI-based data sources are a feature of any J2EE app server, and some
servlet containers (such as Tomcat).  They can easily be used in a Struts
Action.  One of the many conveniences of this approach is that the
resources are configured externally -- you don't need to mess with web.xml
or struts-config.xml for them.  So, for example, the exact same WAR file
can be deployed on a test machine and a production machine, with the
server resource configuration pointing you at the appropriate test or
production database.

Configuration details will depend on your server -- here's the docs for
Tomcat:

http://jakarta.apache.org/tomcat/tomcat-4.1-docs/jndi-resources-howto.html

http://jakarta.apache.org/tomcat/tomcat-4.1-docs/jndi-datasource-examples-howto.html


>
> Regards,
> Jailani.S
>

Craig

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


Mime
View raw message