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?
> 
> 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]
> 
>

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

Reply via email to