Ananth Chellathurai wrote:
Taking couple of DAOs
Do you mean to say that you are planning only to use Spring for transaction handling and for the data access layer?
To integrate your Struts application with Spring, you have two options:
Configure Spring to manage your Actions as beans, using the ContextLoaderPlugin, and set their dependencies in a Spring context file.Subclass Spring's ActionSupport classes and grab your Spring-managed beans explicitly using a getWebApplicationContext() method.
We follow the first approach.
Thanks for the quick reply! Yes, we have in mind the first option. I haven't had any exposure to Spring, except in reading *about* it, but my teammate who used it on another project tells me that we can use an applicationContext.xml file to define services, which refer to DAO methods. We annotate our Action classes that have traditionally instantiated a DAO individually and participated in Connection Pool sharing such that "Spring handles the connections." Does that sound right?