Search in sources :

Example 1 with SharedTransactionManager

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

the class SharedComponentListTest method testSharedTransactionManager_CompEnvLookupName.

@Test
public void testSharedTransactionManager_CompEnvLookupName() throws Exception {
    Adapter adapter = new Adapter();
    adapter.setUniqueId(getName());
    adapter.getSharedComponents().setTransactionManager(new DummyTransactionManager(getName()));
    try {
        start(adapter);
        SharedTransactionManager conn = new SharedTransactionManager("comp/env/" + getName());
        conn.init();
        assertNotNull(conn.proxiedTransactionManager());
    } finally {
        stop(adapter);
    }
}
Also used : DummyTransactionManager(com.adaptris.core.transaction.DummyTransactionManager) SharedTransactionManager(com.adaptris.core.transaction.SharedTransactionManager) Test(org.junit.Test)

Example 2 with SharedTransactionManager

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

the class SharedComponentListTest method testSharedTransactionManager_StandardLookup.

@Test
public void testSharedTransactionManager_StandardLookup() throws Exception {
    Adapter adapter = new Adapter();
    adapter.setUniqueId(getName());
    adapter.getSharedComponents().setTransactionManager(new DummyTransactionManager(getName()));
    try {
        start(adapter);
        SharedTransactionManager conn = new SharedTransactionManager(getName());
        conn.init();
        assertNotNull(conn.proxiedTransactionManager());
    } finally {
        stop(adapter);
    }
}
Also used : DummyTransactionManager(com.adaptris.core.transaction.DummyTransactionManager) SharedTransactionManager(com.adaptris.core.transaction.SharedTransactionManager) Test(org.junit.Test)

Aggregations

DummyTransactionManager (com.adaptris.core.transaction.DummyTransactionManager)2 SharedTransactionManager (com.adaptris.core.transaction.SharedTransactionManager)2 Test (org.junit.Test)2