Hi
I'm wondering, can JAX-RS itself help you, such that you don't rely on other
technologies to help you with managing the state, etc ?
Ex., JAX-RS lets you access Cookies and create new ones explicitly from the application code and easily set them on a response
(provided you rely on cookies for the session management).
Arguably, it would be more complicated though - but it would likely give you
more control ovet the cookies management...
Cheers, Sergey
Hi Ian/Sergey,
Ultimately I had to do what Ian suggested. I was kind of avoiding that
because making the service bean session scoped would be neat. Here's the
deal. I had to do some pagination in my service bean and thats why I was
trying to make it session scoped(by adding aop:scoped-proxy tag) so that
pagination would work properly for different users. Yesterday I read
somewhere that Spring's resource injection may override Apache CXF's
resource injection sometimes, which I think was happening in my case. So
ultimately I placed the session-sensitive info (i.e. the object holding the
results being paginated, along with the pagination info) into the session.
I did not use a separate class xyzSessionState to store the session state.
So this way having a singleton service bean did not cause any problem.
Although I wish I could somehow make the aop:scoped-proxy work with Spring
2.0 and Apache CXF.
Thanks everybody for your help.
----------------------------
IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland