HI,
   We have done this with DBCP. Our doubt is this. If DBCP has a factory,
then it should also be a able to use our JTurbo pool connection factory ?
Right ? Isn't it like the commons logging factory which recognizes log4j or
java.util.Logging
Thanks,
Mohan

-----Original Message-----
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 07, 2003 10:03 AM
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: Re: linking a struts application to a jndi resource through a
datasource




On 6 Jan 2003, Nick Torenvliet wrote:

> Date: 06 Jan 2003 22:46:26 -0500
> From: Nick Torenvliet <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>,
>      [EMAIL PROTECTED]
> To: Struts Users Mailing List <[EMAIL PROTECTED]>
> Subject: linking a struts application to a jndi resource through a
>     datasource
>
> Hi, So I've got two pieces, on one side a working mysql struts data
> source example, on the other side a working tomcat 4.1 servlet.xml
> configured jndi resource linked to a mysql data base.  I want to access
> the jndi from inside of struts, can I configure a data source to link to
> the jndi resource, if so should I be including any special name or key
> parameters in the datasource, or give it a special type?
>

If you want to use JNDI-based data sources, you don't need *anything* in
struts-config.xml, and you would use the standard JNDI programming logic
to utilize it.  See the following docs for more info:

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

Although the mechanism for configuring a JNDI data source in your
container is container-specific, the setup of your web.xml file (i.e. a
<resource-ref> element) and the code to access it (getting the
InitialContext and so on) is portable.

Use *either* the Struts <data-source> *or* JNDI.  Not both.

Craig


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to