On 15/02/2004 12:26 Ben Turner wrote:
hello,

i have been looking (in vain) for a description how to implement database
access in struts correctly. i would like to use the DAO (data access
object)
pattern in combination with datasources for connection pooling. however,
i
am having a hard way figuring out how to implement the whole and to
decouple
my actions from knowing about the implementation of the DB.

The simple answer is that you don't. Struts has nothing to do with data persistence. What I think you're really asking is how to implement persistence in a web application.



the example application bundled with struts uses a plugin to set up everything in the application context - is this the right way to go about things? i am planning on using postgresql for the moment but would like to foresee possible changes in the future.

Well, I suppose you could use the Struts Datasource plug-in if you feel that's the way to go but I think you'll find most people use JNDI and the container-supplied connection pool.


--
Paul Thomas
+------------------------------+---------------------------------------------+
| Thomas Micro Systems Limited | Software Solutions for the Smaller Business |
| Computer Consultants | http://www.thomas-micro-systems-ltd.co.uk |
+------------------------------+---------------------------------------------+


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



Reply via email to