Database connections (ie jdbc) are usually done through connection manager classes or container managed data sources. Our infrastructure provides a PoolManager which does db, ldap, custom, etc pooling. When we want a connection we just "PoolManager.getCurrent().getConnection(...). The connections are pooled behind the scenes, improving effeciency, etc. Of course when I hear "model" I think totally independent classes which could be reused in any jvm, so I probably would have some type of persistance manager class asking for the connections to do the persistance work on the model object.
Tim "Kenny Smith" <kenny@journal scape.com> 09/06/2002 11:32 AM To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Please respond cc: to "Struts Users Mailing List" Subject: RE: how to return errors from Model component Caterpillar: Confidential Green Retain Until: 10/06/2002 Retention Category: G90 - Information and Reports Hi, > Someone on the list once said that the Model should > not know its in a web app... I totally agree with this statement, but I've been having real problems keeping the Model from knowing it's a webapp and still being able to properly share a database connection. I'm still a beginner to java and struts, so there may be a simple answer I'm missing but... How do you guys and gals get your model objects to share your database connections without letting them know they are a web app? Kenny Smith JournalScape.com -- 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]>