I see a couple of options.

The first would be to create an interceptor for your singleton factory. In the init of the interceptor you would initialize this factory and then provide some mechanism to inject that factory into your actions. (possibly via a FactoryAware interface)

Another option would be to convert your factory to use spring. Spring provides mechanisms to initialize beans:
http://static.springframework.org/spring/docs/2.0.x/reference/beans.html#beans-factory-lifecycle-initializingbean
Tom


bob wrote:
I could be wrong, but perhaps you should use the Spring IoC container for this. I can't point you to the correct documentation off hand, but I believe that this is the way to maintain a resource such as what you had previoulsy done with the Servlet's init method and the factory class.
Maybe someone with more experience integrating spring and struts2 can chime in 
with some doc recommendations.  I'm a bit of a newbie myself unfortunatley.




_______________________________________________
Join Excite! - http://www.excite.com
The most personalized portal on the Web!



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




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

Reply via email to