You need JTA for distributed transactions only, but it is more about implementation. You need to think about transaction demarcation only, it is not a persistence aspect, transaction is conceptual thing ( "unit of work" ), but in implementation it can be same as JDBC transaction. You need to use new session per transaction because session local cache becomes invalid at the end of transaction, transaction must be thread local too, but you can have many transactions in the same thread (It is implementation limitation, but it is not problem)
|