struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Newton <>
Subject Re: Data-sources using struts:Tomcat's or NOT?
Date Fri, 21 Apr 2006 02:38:06 GMT
M.Liang Liu wrote:
> My question is that: Which one is better namely more effective´╝čWhich one is deprecated?
Or both are OK?


"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.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message