You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by ja...@polaris.co.in on 2003/07/07 06:39:08 UTC

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.

Regards,
Jailani.S





Re: db connection pooling

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

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 <st...@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


Re: db connection pooling

Posted by Micael <ca...@harbornet.com>.
Use a plugin.

At 10:09 AM 7/7/03 +0530, you wrote:
>Hi,
>
>Is there any ways to achieve db connection pooling and access of such
>pooled connection though jndi in struts action classes.
>
>Regards,
>Jailani.S
>
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: struts-user-help@jakarta.apache.org



LEGAL NOTICE

This electronic mail  transmission and any accompanying documents contain 
information belonging to the sender which may be confidential and legally 
privileged.  This information is intended only for the use of the 
individual or entity to whom this electronic mail transmission was sent as 
indicated above. If you are not the intended recipient, any disclosure, 
copying, distribution, or action taken in reliance on the contents of the 
information contained in this transmission is strictly prohibited.  If you 
have received this transmission in error, please delete the message.  Thank 
you  



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


RE: db connection pooling

Posted by Navjot Singh <na...@net4india.net>.
why not? 
Simply configure one jndi data source in struts-config and you are on.

HTH
-navjot

|-----Original Message-----
|From: jailani.s@polaris.co.in [mailto:jailani.s@polaris.co.in]
|Sent: Monday, July 07, 2003 10:09 AM
|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.
|
|Regards,
|Jailani.S
|
|
|
|
|

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


RE: db connection pooling

Posted by Alex Shneyderman <al...@law.columbia.edu>.
Use jakarat DBCP. If you read thru tomcat's (that is if you use tomcat)
howto's they explain how to set it up. 

> -----Original Message-----
> From: jailani.s@polaris.co.in [mailto:jailani.s@polaris.co.in]
> Sent: Monday, July 07, 2003 12:39 AM
> 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.
> 
> Regards,
> Jailani.S
> 
> 
> 



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