struts2 - Spring DI : session vise object creation using aop proxy for inherited class -


in project have used struts2 , spring. spring used di. having actions created sessions , model beans via spring di. want use inheritance class generated through aop based proxy , per session. coding goes below.

<bean id="common.eshopdefaultaction" class="com.common.actions.eshopdefaultaction"   scope="session" >     <property name="site" ref="master.site" />     <property name="menu" ref="master.menu" />     <property name="indexdao" ref="common.indexdao" />     <property name="categorydao" ref="master.categorydao" />     <property name="productdao" ref="master.productdao" /> </bean>  <bean id="common.indexaction" parent="common.eshopdefaultaction" class="com.common.actions.indexaction" scope="session">     <property name="indexinfo" ref="common.indexinfo" />     <aop:scoped-proxy /> </bean> 

both actions having pairs of setters , getters. want have site,menu, indexdao, categorydao, productdao objects created session of child indexaction shown above. right creates different objects eshopdefaultaction , indexaction.

adding <aop:scoped-proxy /> eshopdefaultaction bean definition gives error

invalid property 'targetbeanname' of bean class [com.common.actions.indexaction]:  bean property 'targetbeanname' not writable or has invalid setter method.  parameter type of setter match return type of getter? 


Comments

Popular posts from this blog

How to mention the localhost in android -

php - Calling a template part from a post -

c# - String.format() DateTime With Arabic culture -