Announcement Announcement Module
Collapse
No announcement yet.
Weird Session behavior with transactions and HibernateTemplate when upgrading to 2.5 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Weird Session behavior with transactions and HibernateTemplate when upgrading to 2.5

    I'm experiencing weird session behavior with the HibernateTemplate when upgrading to 2.5.6.

    When we developed our application on spring 1, we wanted flexibility in how long our Hibernate Session was being held open and we found that PROPAGATION_SUPPORTS on using the TransactionProxyFactoryBean would hold the session open for the method length regardless if we wanted to use a transaction or not.

    Layered proxies would allow us to utilize the same session with transactions effectively allowing us to dictate session duration as well as provide granular transactions on a single session.

    When I upgraded from 2.0.X to 2.5.X I noticed that the layered proxies would create new session when entering a PROPAGATION_REQUIRED instead using the same session if the initial proxy was had initialized with PROPAGATION_SUPPORT.

    I've looked attempting to set SYNCHRONIZATION_ALWAYS on the transaction manager as the api docs recommends, but I still can't get a nested proxy to use the same session as parent proxy. Anyone have any suggestions?
Working...
X