protected UserTransaction getUserTransaction ( boolean injection , Object injectionContext ) throws NamingException { final UserTransaction ut = AccessController . doPrivileged ( new PrivilegedAction < UserTransaction > ( ) { @ Override public UserTransaction run ( ) { return userTranSvcRef . getBundle ( ) . getBundleContext ( ) . getService ( userTranSvcRef ) ; } } ) ; final UserTransactionDecorator utd = getUserTransactionDecorator ( ) ; if ( utd == null ) { return ut ; } else { return utd . decorateUserTransaction ( ut , injection , injectionContext ) ; } }
Helper method for use with injection TransactionObjectFactoruy .