Back Forum Reply New

using final methods in a session scope bean

Hi all,

I am having the following problem with Spring 2.01:- I have beans a,b in scope session, a is of type A and b is of type B.:
lt;bean id=quot;aquot;
class=quot;com.Aquot; scope=quot;sessionquot;
lazy-init=quot;truequot;gt;
lt;aop:scoped-proxy /gt;
lt;property name=quot;bquot; ref=quot;bquot;gt;lt;/propertygt;
lt;/beangt;
lt;bean id=quot;bquot;
class=quot;com.Bquot; scope=quot;sessionquot;
lazy-init=quot;truequot;gt;
lt;aop:scoped-proxy /gt;
lt;/beangt;

- A has a memebr of type B, with a getter and setter, the getteramp;setter methods are final.
public final B getB(){..}
public final void setB(B b){..}

And when running this code, I see the quot;bquot; member in quot;aquot; arrives empty. I think I know the reason for that but I was hoping someone has a workaround. I think it happens because when defining a bean in scope session we actually have a proxy that has to override the get/set methods.

Does any one have a workaround for that?

Thanks
Ora
¥
Back Forum Reply New