commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lafredo, Stephen" <>
Subject RE: [newbie]DBCP with Struts
Date Wed, 26 Mar 2003 14:14:46 GMT
I implemented my DAO framework following based on this sample application.

It does exactly what you are asking.


Stephen Lafredo
Merck & Co., Inc.
USHH IS Application Architecture

-----Original Message-----
From: Johan Wasserman [] 
Sent: Wednesday, March 26, 2003 8:04 AM
Subject: [newbie]DBCP with Struts

I am now building a DAO (thanks for putting me on the right track Mr.
Graham) and I'm trying to find a way for the DAO to establish it's own
connection to the database pool/s created by the ActionServlet. Again, I
must stress that I am very new to struts and dbcp.  I would prefer not to
pre-established connection (using getConnection) and passing that to the
DAO, and I believe the method I'm trying to use below should be helpful in a
lot of other circumstances as well.
Note: If anyone has the perfect solution for a data strategy for multiple
companies using the same struts app, please advise!
I know that would be very easy if my pool/s where configured in server.xml
and then would be accessable through initialContext.  But being configured
in strust-config (servlet context) I cannot set up a <resource-ref> for it
in web.xml.  (in servlet and not container context, because multiple
companies share the same web-server, but have their own app connecting to
their unique db instance).

Notice:  This e-mail message, together with any attachments, contains information of Merck
& Co., Inc. (Whitehouse Station, New Jersey, USA) that may be confidential, proprietary
copyrighted and/or legally privileged, and is intended solely for the use of the individual
or entity named in this message.  If you are not the intended recipient, and have received
this message in error, please immediately return this by e-mail and then delete it.


View raw message