Re: Database Best Practices

2005-08-19 Thread Larry Meadors
Here is one example: http://ibatis.apache.org/petstore.html It's use of struts is different, but the database access approach is solid. Larry On 8/17/05, C.F. Scheidecker Antunes <[EMAIL PROTECTED]> wrote: > Hello all, > > In order to access a Database on my Model layer, which one is best? >

Re: Database Best Practices

2005-08-19 Thread Thomas Hartwig
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 th

Re: Database Best Practices

2005-08-17 Thread erikweber
des. Don't forget to implement cleanup or releaseConnection, too. Erik -Original Message- From: "C.F. Scheidecker Antunes" <[EMAIL PROTECTED]> Sent: Aug 17, 2005 9:22 PM To: Struts Users Mailing List Subject: Database Best Practices Hello all, In order to access a Da

Database Best Practices

2005-08-17 Thread C.F. Scheidecker Antunes
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 connectio