Hi Caroline,
ideally you should keep your connection & related objects in your business / model layer since it has nothing to do with the view or controller parts of your app.


You can utilise the same tomcat JNDI set-up for the connection pool. Struts does have its own connection pooling facility, but it's recommended to use the app server for this when possible.

You could easily do that by cut-and-pasting your JNDI & DataSource code into a business bean super class or helper class.


Adam


On 10/01/2003 07:42 AM Caroline Jen wrote:
Before I started converting my web app to STRUTS, I
used a DataSource to do connection pooling. I had the
Tomcat server.xml file configured. My servlet accessed
a helper class in which I had Context.lookup for the
JNDI name.  All worked well.

Now that I am using STRUTS. I try to authenticate the
logon information against "database".  Should I keep
Connection, ResultSet, Statement in an Action or in a
business bean?  How should I utilize a DataSource and
Connection Pooling in STRUTS 1.1?




__________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com

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



-- struts 1.1 + tomcat 5.0.12 + java 1.4.2 Linux 2.4.20 RH9


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



Reply via email to