Results 1 to 5 of 5

Thread: Suggestion: Inject HttpSession to RemotingServices

  1. #1
    Join Date
    Jun 2006
    Posts
    27

    Lightbulb 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?

  2. #2
    Join Date
    Dec 2006
    Location
    Normal, Illinois
    Posts
    277

    Default

    Take a look at custom scoped beans to see if that might be of some assistance.

    http://static.springframework.org/sp...scopes-session
    Caleb Washburn

  3. #3
    Join Date
    Jun 2006
    Posts
    27

    Thumbs up

    Thanks cwash5.

    After adding the <aop:scoped-proxy/>.
    Everything worked well.

  4. #4
    Join Date
    Jun 2006
    Posts
    27

    Default

    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?

  5. #5
    Join Date
    Jun 2006
    Posts
    27

    Default

    Forget it, i just had to implement the DisposableBean interface.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •