usiness logic beans?=
X-Mailer: Sysdump.com
X-Originating-IP: 12.83.106.244
Content-Type: text/plain; charset=iso-8859-1
From: <[EMAIL PROTECTED]>

I am trying to stick with the MVC paradigm and keep separate the model from the view.  
As the Struts User Manual suggests, I am writing the business logic as Javabeans (not 
EJB), these beans are used by the JSP pages.  I would like to have all of the database 
work done within one bean and have other beans closer to the view use that bean to do 
the actual selects and updates/inserts.  This would be easy if the db bean opened a db 
connection each time it was instantiated, but to be able to effectively use a 
connection pool, it would need to persist (like a servlet).

The problem I am having is how would I give the other beans access to this db bean 
that has the connection pool?  I was thinking I could maybe put the db bean into the 
ServletContext to give it 'app scope', but then those other beans would still be 
unable to access it since they don't have access to anything that has to do with the 
view.  What I am considering is having the beans used by the JSPs store the connection 
pool and then when they need to access the database they could create the db bean 
object and pass it a free Connection to do its work...

Any suggestions?

Thanks,
Kenny

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

Reply via email to