Since Struts stores the DataSource in the ServletContext you can reference it outside of Actions. I prefer the struts method because it's container independent. If you're always going to use a particular container then that reason doesn't matter.

David






From: "Matt Raible" <[EMAIL PROTECTED]>
Reply-To: "Struts Developers List" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Subject: struts-config.xml datasource vs. Tomcat's Connection Pool
Date: Thu, 5 Dec 2002 00:28:13 -0700

I've heard that the data-source definitions in struts-config.xml use
Common's DBCP, just like Tomcat 4.1-5.0 uses for it's connection
pooling.  Is it then safe to say that implementing a data-source via
struts-config.xml will give you the same connection pooling architecture
as configuring it in Tomcat's server.xml? What is the difference between
the two?  I'm guessing that if you configure in struts-config.xml, you
have to access your connection in an action, and if you do it in Tomcat,
you can access it via JNDI.  Is that a fair analogy?

Thanks,

Matt

_________________________________________________________________
Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail


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

Reply via email to