Dec 20th, 2006, 06:03 PM
Suggestion: Inject HttpSession to RemotingServices
I had this issue and i read many threads in this forum about the problem. There is no easy and elegant way to access the httpsession from a service. wheter it is a webservice like burlap/hessian or the httpinvoker.
Especially in cases where the server needs to store information for the connected user and reuse the information it would be very nice to have a possibility to inject the current http session into my service implementation.
It would be even better to have an annotation that injects the HttpSession into a property of the ServiceImplementation to avoid having the getters and setters for the httpsession in the service interface.
Any opinions on that?
Dec 20th, 2006, 06:12 PM
Take a look at custom scoped beans to see if that might be of some assistance.
Dec 21st, 2006, 08:57 AM
After adding the <aop:scoped-proxy/>.
Everything worked well.
Dec 21st, 2006, 09:06 AM
Now i want to be informed when a seession scoped bean gets removed. Is there a way to get informed without implementing a httpsession listener?
Dec 21st, 2006, 09:27 AM
Forget it, i just had to implement the DisposableBean interface.