Announcement Announcement Module
No announcement yet.
session hell with Hessian/DispatcherServlet Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • session hell with Hessian/DispatcherServlet


    i am encountering something weird. When i am calling hessian webservice endpoints configured as seen in Spring docs, each call generates a new session inside my container. Since i am using these webservices very heavily, i am getting thousands of sessions where only some of them are real users, the rest are webservice calls.

    Now i dont do anything with the session, in fact my WS Pojo is absolutely unaware thats being called from a webservice. So i am guessing that DispatcherServlet does something before my Pojo receives the request. Since i dont know a good way to introspect tomcat session other than looking at the serialized bytes, i cant say too much about the content. Its of course allways the same size and there is at minimum a Long, Number and a String in there.

    So i would love to hear from someone who knows something about the dispatching internals of Spring and why sessions get created.

  • #2
    Uhhh... solved

    I just wanted to say that nobody needs to reply to this because after some extensive debugging, i finally found out the reason. After creating a debug SessionFilter, i saw who was responsible for all the sessions and here it comes:

    doFilter():47, com.opensymphony.module.sitemesh.filter.PageFilter

    Sitemesh is possible one of the greatest APIs in the world, but because its so invisible, its sometimes hard to debug.

    So i can confirm that Springs dispatching mechanism dont create sessions at all ;-)