@Override @SuppressWarnings("unchecked") protected TransactionManager locateTransactionManager() { try { final Method method = transactionManagerAccessClass.getMethod( "getTransactionManager" ); return (TransactionManager) method.invoke( null ); } catch (Exception e) { throw new JtaPlatformException( "Could not obtain WebSphere TransactionManager", e ); } }
@Override protected TransactionManager locateTransactionManager() { try { final Class clazz = Class.forName( TM_CLASS_NAME ); final Method getTransactionManagerMethod = clazz.getMethod( "getTransactionManager" ); return (TransactionManager) getTransactionManagerMethod.invoke( null ); } catch (Exception e) { throw new JtaPlatformException( "Could not obtain JOnAS transaction manager instance", e ); } }
@Override public void registerSynchronization(Synchronization synchronization) { try { transactionManagerAccess.getTransactionManager().getTransaction().registerSynchronization( synchronization ); } catch (Exception e) { throw new JtaPlatformException( "Could not access JTA Transaction to register synchronization", e ); } }
@Override protected TransactionManager locateTransactionManager() { try { final Class<?> TransactionManagerFactory = serviceRegistry() .getService( ClassLoaderService.class ) .classForName( TMF_CLASS_NAME ); return (TransactionManager) TransactionManagerFactory.getMethod("getTransactionManager").invoke(null); } catch ( Exception e ) { throw new JtaPlatformException( "Could not obtain WebSphere Liberty transaction manager instance", e ); } }
@Override protected TransactionManager locateTransactionManager() { try { final Class tmClass = serviceRegistry().getService( ClassLoaderService.class ).classForName( TM_CLASS_NAME ); final Method getTransactionManagerMethod = tmClass.getMethod( "getTransactionManager" ); return (TransactionManager) getTransactionManagerMethod.invoke( null, (Object[]) null ); } catch (Exception e) { throw new JtaPlatformException( "Could not obtain JOTM transaction manager instance", e ); } }
@Override protected TransactionManager locateTransactionManager() { try { Class transactionManagerServicesClass = serviceRegistry().getService( ClassLoaderService.class ).classForName( TM_CLASS_NAME ); final Method getTransactionManagerMethod = transactionManagerServicesClass.getMethod( "getTransactionManager" ); return (TransactionManager) getTransactionManagerMethod.invoke( null ); } catch (Exception e) { throw new JtaPlatformException( "Could not locate Bitronix TransactionManager", e ); } }
@Override protected TransactionManager locateTransactionManager() { try { Class transactionManagerClass = serviceRegistry().getService( ClassLoaderService.class ).classForName( TM_CLASS_NAME ); return (TransactionManager) transactionManagerClass.newInstance(); } catch (Exception e) { throw new JtaPlatformException( "Could not instantiate Atomikos TransactionManager", e ); } }
@Override protected UserTransaction locateUserTransaction() { try { final Class jbossUtClass = serviceRegistry() .getService( ClassLoaderService.class ) .classForName( WILDFLY_UT_CLASS_NAME ); return (UserTransaction) jbossUtClass.getMethod( "getInstance" ).invoke( null ); } catch (Exception e) { throw new JtaPlatformException( "Could not obtain WildFly Transaction Client user transaction instance", e ); } } }
@Override protected TransactionManager locateTransactionManager() { try { final Class wildflyTmClass = serviceRegistry() .getService( ClassLoaderService.class ) .classForName( WILDFLY_TM_CLASS_NAME ); return (TransactionManager) wildflyTmClass.getMethod( "getInstance" ).invoke( null ); } catch (Exception e) { throw new JtaPlatformException( "Could not obtain WildFly Transaction Client transaction manager instance", e ); } }
@Override protected TransactionManager locateTransactionManager() { //Try WildFly first as it's the "new generation": try { return wildflyBasedAlternative.locateTransactionManager(); } catch ( Exception ignore) { // ignore and look for Arjuna class } try { final Class jbossTmClass = serviceRegistry() .getService( ClassLoaderService.class ) .classForName( JBOSS_TM_CLASS_NAME ); return (TransactionManager) jbossTmClass.getMethod( "transactionManager" ).invoke( null ); } catch ( Exception e ) { throw new JtaPlatformException( "Could not obtain JBoss Transactions transaction manager instance", e ); } }
@Override protected UserTransaction locateUserTransaction() { //Try WildFly first as it's the "new generation": try { return wildflyBasedAlternative.locateUserTransaction(); } catch ( Exception ignore) { // ignore and look for Arjuna class } try { final Class jbossUtClass = serviceRegistry() .getService( ClassLoaderService.class ) .classForName( JBOSS_UT_CLASS_NAME ); return (UserTransaction) jbossUtClass.getMethod( "userTransaction" ).invoke( null ); } catch ( Exception e ) { throw new JtaPlatformException( "Could not obtain JBoss Transactions user transaction instance", e ); } } }
public WebSphereJtaPlatform() { Class tmAccessClass = null; WebSphereEnvironment webSphereEnvironment = null; for ( WebSphereEnvironment check : WebSphereEnvironment.values() ) { try { tmAccessClass = Class.forName( check.getTmAccessClassName() ); webSphereEnvironment = check; log.debugf( "WebSphere version : %s", webSphereEnvironment.getWebSphereVersion() ); break; } catch ( Exception ignore ) { // go on to the next iteration } } if ( webSphereEnvironment == null ) { throw new JtaPlatformException( "Could not locate WebSphere TransactionManager access class" ); } this.transactionManagerAccessClass = tmAccessClass; this.webSphereEnvironment = webSphereEnvironment; }
@Override @SuppressWarnings("unchecked") protected TransactionManager locateTransactionManager() { try { final Method method = transactionManagerAccessClass.getMethod( "getTransactionManager" ); return (TransactionManager) method.invoke( null ); } catch (Exception e) { throw new JtaPlatformException( "Could not obtain WebSphere TransactionManager", e ); } }
@Override public void registerSynchronization(Synchronization synchronization) { try { this.txMgr.getTransaction() .registerSynchronization(synchronization); } catch (Exception e) { throw new JtaPlatformException( "Could not access JTA Transaction to register synchronization", e); } }
@Override protected TransactionManager locateTransactionManager() { try { final Class clazz = Class.forName( TM_CLASS_NAME ); final Method getTransactionManagerMethod = clazz.getMethod( "getTransactionManager" ); return (TransactionManager) getTransactionManagerMethod.invoke( null ); } catch (Exception e) { throw new JtaPlatformException( "Could not obtain JOnAS transaction manager instance", e ); } }
@Override protected TransactionManager locateTransactionManager() { try { Class transactionManagerServicesClass = serviceRegistry().getService( ClassLoaderService.class ).classForName( TM_CLASS_NAME ); final Method getTransactionManagerMethod = transactionManagerServicesClass.getMethod( "getTransactionManager" ); return (TransactionManager) getTransactionManagerMethod.invoke( null ); } catch (Exception e) { throw new JtaPlatformException( "Could not locate Bitronix TransactionManager", e ); } }
@Override protected TransactionManager locateTransactionManager() { try { final Class tmClass = serviceRegistry().getService( ClassLoaderService.class ).classForName( TM_CLASS_NAME ); final Method getTransactionManagerMethod = tmClass.getMethod( "getTransactionManager" ); return (TransactionManager) getTransactionManagerMethod.invoke( null, (Object[]) null ); } catch (Exception e) { throw new JtaPlatformException( "Could not obtain JOTM transaction manager instance", e ); } }
@Override protected TransactionManager locateTransactionManager() { try { Class transactionManagerClass = serviceRegistry().getService( ClassLoaderService.class ).classForName( TM_CLASS_NAME ); return (TransactionManager) transactionManagerClass.newInstance(); } catch (Exception e) { throw new JtaPlatformException( "Could not instantiate Atomikos TransactionManager", e ); } }
@Override protected TransactionManager locateTransactionManager() { try { return com.arjuna.ats.jta.TransactionManager.transactionManager(); } catch (Exception e) { throw new JtaPlatformException( "Could not obtain JBoss Transactions transaction manager instance", e ); } }
@Override protected TransactionManager locateTransactionManager() { try { return com.arjuna.ats.jta.TransactionManager.transactionManager(); } catch (Exception e) { throw new JtaPlatformException("Could not obtain JBoss Transactions transaction manager instance", e); } }