Aug 28th, 2006, 12:00 PM
Spring2 session scope with EJB
I'm unclear on how to best utilize Spring session scoped beans when EJB is involved. I have session scopes working in my applications web application context; however, I would like to scope some of the beans that are utilized by a stateless session bean business delegate so that their properties can be edited by a web application on a per session basis.
Is there a way to register the session scope object from the web application context into its parent context. The parent context is used for the EJB implementation beans.
Another option would be to define some stateful session beans; but I'm hoping this can be done using the web session scope so that I won't need to define a bunch more EJBs.
I am not using the Spring web framework.
I searched around quite extensively for an answer; but have not been able to deduce how one would do this. I'm having trouble finding where the SessionScope gets instantiated and registered. I didn't see a getScope method on the ConfigurableBeanFactory interface.
What is the recommended solution?
Aug 29th, 2006, 12:31 PM
Well, I give up.
I don't think there is a way to propogate the session scope to the parent context. It looks to me like I'll need to use stateful session EJBs or eliminate the stateless EJB and deploy everything to the web application context.