M.Liang Liu wrote: > My question is that: Which one is better namely more effective?Which one is > deprecated? Or both are OK? >
>From http://struts.apache.org/struts-doc-1.2.9/faqs/database.html: "NOTE: It is preferred that data connectivity be handled directly by the business classes, usually via JNDI. The Struts DataSource manager should only be used with legacy business classes that don't provide their own connectivity. When possible, we strongly recommend use of the standard DAO pattern, so that the Action classes do not need to know anything about the persitence mechanism. The DataSource manager is being retained in Struts 1.x for backward compatibility but may not be retained in Struts 2.x or later. Also, by putting datasource definitions in JNDI it makes it very simple to change your connection parameters based on which server you're on; nice for development/staging/production environments. Dave --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]