2012/10/1 Aum Strut <aum.str...@gmail.com>: > Hi All, > > i am having a small doubt regarding bean creation in struts2,while going > through some of the plugin i saw following code > > inside the Interceeptor > > @Inject > public void setMyManager(MyManager myManager) { > this.MyManager = myManager; > } > > and here is the entry in struts-plugin.xml file > > <bean type="abc.MyManager" class="abc.DefaultManager" /> > > My doubt is how the DefaultManager will be instantiated,since the > intercepor will get called each time there is a call to the action for > which this particular interceptor has been configures, so will S2 going to > create a new instance of "DefaultManager" or will it be a singlton which > will get created at the time of application startup? > > i have tried to search docs but not able to fine anything related to this
https://svn.apache.org/repos/asf/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/inject/Scope.java And by default the scope is DEFAULT - as above when you didn't specify the scope. Regards -- Ćukasz + 48 606 323 122 http://www.lenart.org.pl/ --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org