The better solution is dependency injection with Spring, use the
struts2-spring-plugin.

On Thu, 2011-11-10 at 15:09 -0500, Eric Reed wrote:
> You should have an initialization servlet run at startup that can create such 
> an object.
> 
> 
> >>> Scott Smith <ssm...@mainstreamdata.com> 11/10/2011 3:06 PM >>>
> In struts 1, I used org.apache.struts.action.PlugIn as a way to create an 
> object at web app startup and put it into the application context so that all 
> sessions had access to it.  What's the equivalent method in Struts2?  That 
> is, how can I have an object created at web application startup.
> 
> I guess the alternative is lazy initialization (first guy who tries to access 
> it and doesn't find it, creates it, and saves it into the app context; down 
> side is I might end up with several sessions trying to create it until one 
> finally makes it to the app context).
> 
> Any better solutions?
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 





---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to