private Transaction onBegin ( ) { Transaction tx ; if ( ( ( StatelessSessionImpl ) s ) . getTransactionCoordinator ( ) . isTransactionActive ( ) ) { tx = ( ( StatelessSessionImpl ) s ) . getTransaction ( ) ; } else { tx = s . beginTransaction ( ) ; } return tx ; }
On begin .