Hi,

I'm trying to handle with sessions on Spring, and after reading the reference manual and trying what it is exposed I'm not able to use sessions object.

I need an object populated (bean) to be accessed on the whole web application. I have achieved if I use HttpSession object, but I want to do it by session bean scope.

I declared session bean on application-context.xml:

Code:
<bean id="shoppingCart" class="com.toroliga.domain.ShoppingCart" scope="session">
<aop:scoped-proxy/>
</bean>

Shoppingcart object has been annotated with @Scope("Session") and in the Controller it has been annotated @Scope("request"). If I populate ShoppingCart object, nothing happens. When I try to access to the object, it isn't populated.

I have tried eliminating <aop:scoped-proxy> and on this way I can access to the data but only on the actions inside the actual Controller. If I try to access from other controller, the object is null.

Could you explain me how to make a session bean with data already populated accessible from every part of my application?

Thanks.
Regards.
JB