RE: linking a struts application to a jndi resource through a datasource

2003-01-07 Thread Craig R. McClanahan


On Tue, 7 Jan 2003, Mohan Radhakrishnan wrote:

> Date: Tue, 7 Jan 2003 10:52:18 +0530
> From: Mohan Radhakrishnan <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: Struts Users Mailing List <[EMAIL PROTECTED]>
> Subject: RE: linking a struts application to a jndi resource through a
> dat asource
>
> HI,
>We have done this with DBCP. Our doubt is this. If DBCP has a factory,

DBCP does *not* have such a factory.  It does *not* support pooled
connection factory (except in the partially added code from jdbc2pool that
I've never tried).

> then it should also be a able to use our JTurbo pool connection factory ?
> Right ?

No.  It only works with JDBC drivers and plain Connection instances --
DBCP provides its own pooling, so it will work with *any* JDBC driver.

> Isn't it like the commons logging factory which recognizes log4j or
> java.util.Logging

You could always look at the sources to answer questions like this :-).

> Thanks,
> Mohan

Craig


>
> -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
>  element) and the code to access it (getting the
> InitialContext and so on) is portable.
>
> Use *either* the Struts  *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]>
>
>


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




RE: linking a struts application to a jndi resource through a datasource

2003-01-07 Thread Mohan Radhakrishnan
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
 element) and the code to access it (getting the
InitialContext and so on) is portable.

Use *either* the Struts  *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]>




RE: linking a struts application to a jndi resource through a datasource

2003-01-07 Thread Mohan Radhakrishnan
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
 element) and the code to access it (getting the
InitialContext and so on) is portable.

Use *either* the Struts  *or* JNDI.  Not both.

Craig

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