|
Internal components that don't have access to current session can't get current non-JTA transaction. This can be solved by having a singleton/static method that would provide the current transaction through thread-local. Since every transaction should be eventually committed or rolled back, the cleanup of the thread-local can be done easily (as opposed to limitations of ThreadLocalSessionContext). I am assuming that the transaction will span only single thread.
|