David,
That clears up quite a bit for me. So if I have a Resource setup in my container (Tomcat 4.1.24) I can use that resource in any class using JNDI and don't have to worry about specifying it inside my struts-configuration.xml file. Am I understanding you correct.
That's exactly right. You probably want to look it up from JNDI once and cache it somewhere because JNDI calls are potentially expensive.
David
Thanks, Sloan
Struts stores DataSources defined in struts-config.xml in the ServletContext so any class can access them. A more common approach is to define your DataSource in JNDI and have your business objects look it up from there. Both ways allow for MVC and the Struts configuration is provided as a convenience.
David
I have been reading all over the place and can't seem to find a simple answer to my question. In struts using MVC development what is the best method to connect to a database. In struts 1.1rc1 you can specify DataSources but to my understanding you can only access this datasource from within the subclasses of the Action class. Using MVC I don't see how this could be helpful because you couldn't use the Struts datasource in the Data Access Object Beans. I would love to hear all of the ideas everybody has about this and examples if possible. I greatly appreciate it.
Regards, Sloan
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
_________________________________________________________________
STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--
Sloan Bowman
www.nashlinux.com
www.q3networks.com
www.aboutgoodlettsville.com
www.spudibby.com
---------------------------
Windows 95/NT - 32 bit extensions and a graphical shell for a 16 bit patch to an 8 bit operating system originally coded for a 4 bit microprocessor, written by a 2 bit company that can't stand 1 bit of competition.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]