Your DAO objects can be beans. David
From: "V. Cekvenich" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Re: Bean database access concepts
Date: Wed, 27 Nov 2002 12:25:06 -0500
Bean does not access the db!
DAO access the db. (DAO can be implemented several ways)
Bean has a DAO helper.
DAO can get JNDI pool from container or make its own pool, based on properties.
Also, you should be able to unit test you beans for CRUD.
I wonder where the sample code that does this would be? I know, if I go to struts resources page and look for a DB sample, that would do it.
.V
Joao Araujo wrote:I am not using EJB but plain beans to access the database.
I defined everything in such a way to isolate database access from action bean.
Now, I have some doubts about how to access the database connection.
Should I pass the connection as a parameter to the beans that accesss the datdabase, or
should I use another method?
Thanks a lot for your attention,
Joao,
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>