Announcement Announcement Module
No announcement yet.
OpenSessionInFlowListenerInterceptor odd behavior in WebSphere Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • OpenSessionInFlowListenerInterceptor odd behavior in WebSphere


    I know that the OpenSessionInFlowListenerInterceptor class is not "officially" part of Spring (yet). But it's a very useful and necessary utility for complex webflows. It basically keeps the hibernate session open throughout the flow execution (it just binds it to different DB connections for each request). The code I got came from here:

    Anyway, when I first tried to run my app in WebSphere 6 (I develop with Tomcat), I got this error: "Connection Closed". This only happened on some of the pages, and not on others. I looked at all my configurations and the only thing that I thought could possibly affect this was that I made my db connections Unshareable. So I changed it to Shareable and it actually works without any problem.

    I'm curious if anyone else has run into this, and if anyone knows why this happens. For this particular app I dont see any reason not to make connections Shareable, but there are cases when you need to do that (for example, to avoid deadlocks if you have legacy code using the same connection pool and this code opens multiple connections per thread)