struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dusty <>
Subject Re: Spring Scope Default
Date Mon, 26 Jan 2009 16:38:37 GMT

Lukasz Lenart wrote:
> 2009/1/26 dusty <>:
>> When using the struts2-spring-plugin, without bean declaration for your
>> actions, what is the default scope for the created Action beans? 
>> Prototype,
>> I hope, but I can't really find where that is set or happens.  I know the
>> default for Spring beans when not otherwise specified is Singleton, so I
>> am
>> curious how the plugin gets the prototype scope in this instance.
>> The setup is:
>> * ContextLoaderListener in web.xml
>> * struts2-spring-plugin declared in maven
>> * actions configured as such in struts.xml
>> <action name="show" class="com.full.package.Action" method="show">
>> ....
>> </action>
>> * No Spring bean configuration for actions in XML or annotations.
>> What is the scope of the created actions?  How do you test/prove that?
> In such way, when Spring is not able to create an action (no bean
> defintion), standard Struts2 ObjectFactory is used instead, which will
> create action for each request.

Interesting.  So I am being lazy by not looking at the code first; How does
it register the new action object with Spring so its services can be
autowired in?
View this message in context:
Sent from the Struts - User mailing list archive at

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

View raw message