struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tarun Reddy" <btarunre...@gmail.com>
Subject Re: How to configure Struts connection pool
Date Mon, 03 Apr 2006 13:25:46 GMT
Hi Craig,
I'm very glad to recieve an e-mail from you. I keep following your
interviews in www.theserverside.com . Well I didn't know that Struts
DataSource concept has been deprecated. I've been using Weblogic from so
many years and it's very easy to configure datasources and connection pools
in Weblogic.

Thanks,
Tarun.

On 4/2/06, Craig McClanahan <craigmcc@apache.org> wrote:
>
> On 4/2/06, Tarun Reddy <btarunreddy@gmail.com> wrote:
> >
> > Could you please try not to configure your data source in Tomcat?
> Instead
> > try to configure your datasource only in struts-config.xml file as I've
> > mentioned. It should work. Please get rid of the JNDI lookup code from
> the
> > JSP and use the getDataSource(request) method which is very intelligent
> > enough to pick up the datasource object. Just to try this approach,
> > comment
> > out the resource definitions part in Tomcat and confiure the datasource
> > exactly as I've mentioned. I was also facing some problems when I tried
> to
> > keep the "key" attribute and retrieve the DataSource object through JNDI
> > lookup. Let me know if you still face any issues.
>
>
> Tarun,
>
> Using a Struts data source, instead of JNDI, is not a good long term
> solution.  Indeed, the Struts data source implementation was deprecated in
> version 1.1 and removed in version 1.2.  Current best practice for
> configuring data sources *is* to use the JNDI capabilities of your
> container.  The only reason that Struts provided a data source
> implementation at all is that servlet containers six years ago did not
> support JNDI.  Now they do.
>
> Tomcat has pretty reasonable documentation on how to configure and use
> JNDI-based data sources.  Start at:
>
>     http://tomcat.apache.org/tomcat-5.0-doc/jndi-resources-howto.html
>
> and
>
>
>
> http://tomcat.apache.org/tomcat-5.0-doc/jndi-datasource-examples-howto.html
>
> If you still have questions, the Tomcat user mailing list is a good place
> to
> get answers.
>
>
> Thanks,
> > Tarun.
>
>
> Craig
>
>
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message