views:

42

answers:

1

Hello everyone,

Currently we use a session per Operation (anti-) Pattern with Hibernate/Spring for our Swing client/server application. The application grew and requests got more and more complex, which resulted in bad performance issues. Because of that, we decided to reuse the session for complex requests, which need to perform more requests on the database.

We have been told that the ThreadLocal Session Pattern might be useful to achieve this aim. We read about it, and it seems to perfectly fit, but I also heard, that Spring can handle ThreadLocals by itself. Unfortunately I wasn’t able to confirm this information and didn’t found any helpful information about it yet. Since I am kinda new to this, I might search for the wrong keywords.

Has anyone any experiences concerning this use case and knows in which context I might find more information about it? Or do we have to take care on when to open/close sessions ourselves? Thanks for any help!

Greets, ymene

+1  A: 

Maybe this reply on a forum topic on Spring Community site may help you.

Boris Pavlović
thanks, these links indeed have been useful. Unfortunatly the example link is already broken. Seems to be hard to find a Session per Request Example for a Swing Client/Server Application instead of a web Application.
ymene