Search in sources :

Example 11 with ResourceAdapter

use of javax.resource.spi.ResourceAdapter in project cxf by apache.

the class TestableAssociatedManagedConnectionFactoryImpl method testSetWrongResourceAdapterThrowException.

@Test
public void testSetWrongResourceAdapterThrowException() throws Exception {
    TestableAssociatedManagedConnectionFactoryImpl mci = new TestableAssociatedManagedConnectionFactoryImpl();
    ResourceAdapter rai = EasyMock.createMock(ResourceAdapter.class);
    try {
        mci.setResourceAdapter(rai);
        fail("exception expected");
    } catch (ResourceException re) {
        assertTrue("wrong ResourceAdapter set", re.getMessage().indexOf("ResourceAdapterImpl") != -1);
    }
}
Also used : ResourceAdapter(javax.resource.spi.ResourceAdapter) ResourceException(javax.resource.ResourceException) Test(org.junit.Test)

Aggregations

ResourceAdapter (javax.resource.spi.ResourceAdapter)11 ConnectorRuntimeException (com.sun.appserv.connectors.internal.api.ConnectorRuntimeException)3 ActiveJmsResourceAdapter (com.sun.enterprise.connectors.jms.system.ActiveJmsResourceAdapter)3 Method (java.lang.reflect.Method)3 JmsHost (com.sun.enterprise.connectors.jms.config.JmsHost)2 MQAddressList (com.sun.enterprise.connectors.jms.system.MQAddressList)2 IOException (java.io.IOException)2 InvalidObjectException (java.io.InvalidObjectException)2 ObjectStreamException (java.io.ObjectStreamException)2 Serializable (java.io.Serializable)2 MalformedURLException (java.net.MalformedURLException)2 URISyntaxException (java.net.URISyntaxException)2 Properties (java.util.Properties)2 ExecutionException (java.util.concurrent.ExecutionException)2 TimeoutException (java.util.concurrent.TimeoutException)2 DefinitionException (javax.enterprise.inject.spi.DefinitionException)2 DeploymentException (javax.enterprise.inject.spi.DeploymentException)2 InstanceNotFoundException (javax.management.InstanceNotFoundException)2 MBeanRegistrationException (javax.management.MBeanRegistrationException)2 MalformedObjectNameException (javax.management.MalformedObjectNameException)2