struts-user mailing list archives

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



Lukasz Lenart wrote:
> 
> 2009/1/26 dusty <dustin_pearce@yahoo.com>:
>> 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: http://www.nabble.com/Spring-Scope-Default-tp21660528p21668715.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


Mime
View raw message