Register / Login
Object Relational Mapping
Session per request programming
posted 5 years ago
I am having a question regarding changing into session per request
Say, if we had a method
Something sth = someService.getSomethingById(1111);
When we had the transaction boundaries around the method (getSomethingById), and nothing else outside the method (transaction), the "sth" would be in transient state, right?
HOwever, if we changed to session per request pattern, then we have another transaction/session wrapping outside of this current method. so the "sth" would be in persistent state?
In the same way, does changing to session per request pattern warrant changes to our code? so far, we are fine. however, is there the cases that we MUST change the code in order to work?
thanks for replies,
closing hibernate Session in BaseRootDAO
Unified Session Creating PRoblem when implementing Session Per Request
Byron's SCEA Preparation Exam: Question #2
When to release JDBC resources?
EJB2 transaction attributes