use of org.hibernate.engine.transaction.jta.platform.spi.JtaPlatformException in project hibernate-orm by hibernate.
the class BitronixJtaPlatform method locateTransactionManager.
@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);
}
}
use of org.hibernate.engine.transaction.jta.platform.spi.JtaPlatformException in project hibernate-orm by hibernate.
the class JOTMJtaPlatform method locateTransactionManager.
@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);
}
}
use of org.hibernate.engine.transaction.jta.platform.spi.JtaPlatformException in project hibernate-orm by hibernate.
the class JOnASJtaPlatform method locateTransactionManager.
@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);
}
}
Aggregations