use of org.apache.ignite.cache.jta.jndi.CacheJndiTmFactory in project ignite by apache.
the class CacheJndiTmFactorySelfTest method testFactoryException.
/**
* @throws Exception If failed.
*/
public void testFactoryException() throws Exception {
final CacheJndiTmFactory f = new CacheJndiTmFactory("wrongJndiName", NOT_TM_JNDI_NAME, "wrongJndiName2");
GridTestUtils.assertThrows(log, new Callable<TransactionManager>() {
@Override
public TransactionManager call() throws Exception {
return f.create();
}
}, IgniteException.class, "Failed to lookup TM by");
}
use of org.apache.ignite.cache.jta.jndi.CacheJndiTmFactory in project ignite by apache.
the class CacheJndiTmFactorySelfTest method testFactory.
/**
* @throws Exception If failed.
*/
public void testFactory() throws Exception {
CacheJndiTmFactory f = new CacheJndiTmFactory("wrongJndiName", NOT_TM_JNDI_NAME, TM_JNDI_NAME2, TM_JNDI_NAME);
TransactionManager mgr = f.create();
assertNotNull(mgr);
assertTrue("Mgr: " + mgr, mgr instanceof TestTransactionManager2);
}
Aggregations