Re: FW: dataSources outside of actionservlet

2002-12-17 Thread Matthias Bauer
The normal thing to is the following: You aquire a database connection in the action class and pass it on as a parameter to the bean's database methods. --- Matthias Mark wrote: Sorry to repost this question, but the more i think about it the more i think it a reasonable one (please tell me

Re: FW: dataSources outside of actionservlet

2002-12-17 Thread keithBacon
Using the command design pattern you can ensure the DB code needs to be coded only once. See the example below http://www.mail-archive.com/struts-user@jakarta.apache.org/msg24579.html --- Matthias Bauer [EMAIL PROTECTED] wrote: The normal thing to is the following: You aquire a database

Re: FW: dataSources outside of actionservlet

2002-12-17 Thread keithBacon
Hi mark, It is a good question! I've not used them so far but i think the new java Properties class is designed to supply config. info to a system. If you have a command processor class that gets the connection maybe you should make it's name a property so you can have a different class in the

RE: FW: dataSources outside of actionservlet

2002-12-17 Thread Edgar P. Dollin
Another option is to aquire the database connection via jndi when you need it. Edgar -Original Message- From: Matthias Bauer [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 9:05 AM To: 'Struts Users Mailing List' Subject: Re: FW: dataSources outside of actionservlet