This might overwhelm you question, but it is worth: have a look at Persistence Frameworks: Hibernate or similar.
C.F. Scheidecker Antunes wrote: > Hello all, > > In order to access a Database on my Model layer, which one is best? > > 1) A DataSource declared on the struts-config.xml. Then get the > DataSource on your code inside either your actions or business classes. > > 2) Create a class that will load the database Driver ,establish the > connection and return a Connection object through a getConnection() > static function? > > It seems to me that the second is better although it takes a little more > effort. > > Any thoughts on that? > > Thanks in advance, > > C.F. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]