Search in sources :

Example 6 with TransactionManager

use of com.adaptris.core.transaction.TransactionManager in project interlok by adaptris.

the class JndiHelperTest method testBindNullTransactionManager_Debug.

@Test
public void testBindNullTransactionManager_Debug() throws Exception {
    TransactionManager transactionManager = null;
    InitialContext initialContext = new InitialContext(env);
    try {
        JndiHelper.bind(initialContext, transactionManager, true);
    } catch (CoreException expected) {
        fail("Should not error, just ignore.");
    }
}
Also used : CoreException(com.adaptris.core.CoreException) DummyTransactionManager(com.adaptris.core.transaction.DummyTransactionManager) TransactionManager(com.adaptris.core.transaction.TransactionManager) InitialContext(javax.naming.InitialContext) Test(org.junit.Test)

Example 7 with TransactionManager

use of com.adaptris.core.transaction.TransactionManager in project interlok by adaptris.

the class SharedComponentListTest method retrieveObjectForSampleConfig.

@Override
protected Object retrieveObjectForSampleConfig() {
    Adapter adapter = null;
    try {
        adapter = createAdapter();
        for (ConnectionBuilder b : ConnectionBuilder.values()) {
            adapter.getSharedComponents().addConnection(b.build());
        }
        TransactionManager transactionManager = new DummyTransactionManager("myTransactionManager");
        adapter.getSharedComponents().setTransactionManager(transactionManager);
        Channel c = new Channel();
        c.setProduceConnection(new SharedConnection("goofy_edison"));
        c.setConsumeConnection(new EmbeddedConnection());
    } catch (Exception e) {
        throw new RuntimeException(e);
    }
    return adapter;
}
Also used : DummyTransactionManager(com.adaptris.core.transaction.DummyTransactionManager) SharedTransactionManager(com.adaptris.core.transaction.SharedTransactionManager) TransactionManager(com.adaptris.core.transaction.TransactionManager) DummyTransactionManager(com.adaptris.core.transaction.DummyTransactionManager) EmbeddedConnection(com.adaptris.core.http.jetty.EmbeddedConnection) NamingException(javax.naming.NamingException) PasswordException(com.adaptris.security.exc.PasswordException)

Aggregations

DummyTransactionManager (com.adaptris.core.transaction.DummyTransactionManager)7 TransactionManager (com.adaptris.core.transaction.TransactionManager)7 Test (org.junit.Test)6 CoreException (com.adaptris.core.CoreException)5 InitialContext (javax.naming.InitialContext)4 SharedTransactionManager (com.adaptris.core.transaction.SharedTransactionManager)2 EmbeddedConnection (com.adaptris.core.http.jetty.EmbeddedConnection)1 PooledConnectionProperties (com.adaptris.core.jdbc.PooledConnectionProperties)1 PasswordException (com.adaptris.security.exc.PasswordException)1 Properties (java.util.Properties)1 NamingException (javax.naming.NamingException)1