Search in sources :

Example 6 with ConnectionDefinition$JAXB.readConnectionDefinition

use of org.apache.openejb.jee.ConnectionDefinition$JAXB.readConnectionDefinition in project tomee by apache.

the class GetterConnectorTest method connector.

@Module
public Connector connector() {
    final ConfigProperty configProperty = new ConfigProperty();
    configProperty.setConfigPropertyName("conf");
    configProperty.setConfigPropertyType(String.class.getName());
    configProperty.setConfigPropertyValue("GetterConnectorTest");
    final ConnectionDefinition connectionDefinition = new ConnectionDefinition();
    connectionDefinition.setConnectionFactoryImplClass(MyMcf.class.getName());
    connectionDefinition.setConnectionInterface(ConnectionFactory.class.getName());
    final OutboundResourceAdapter out = new OutboundResourceAdapter();
    out.getConnectionDefinition().add(connectionDefinition);
    final ResourceAdapter ra = new ResourceAdapter();
    ra.setResourceAdapterClass(MyRa.class.getName());
    ra.getConfigProperty().add(configProperty);
    final Connector connector = new Connector();
    connector.setVersion("1.7");
    connector.setResourceAdapter(ra);
    return connector;
}
Also used : Connector(org.apache.openejb.jee.Connector) ValidatingManagedConnectionFactory(javax.resource.spi.ValidatingManagedConnectionFactory) ConnectionFactory(javax.resource.cci.ConnectionFactory) ManagedConnectionFactory(javax.resource.spi.ManagedConnectionFactory) ConnectionDefinition(org.apache.openejb.jee.ConnectionDefinition) ConfigProperty(org.apache.openejb.jee.ConfigProperty) OutboundResourceAdapter(org.apache.openejb.jee.OutboundResourceAdapter) ResourceAdapter(org.apache.openejb.jee.ResourceAdapter) OutboundResourceAdapter(org.apache.openejb.jee.OutboundResourceAdapter) Module(org.apache.openejb.testing.Module)

Aggregations

ConnectionDefinition (org.apache.openejb.jee.ConnectionDefinition)4 Connector (org.apache.openejb.jee.Connector)4 OutboundResourceAdapter (org.apache.openejb.jee.OutboundResourceAdapter)4 ResourceAdapter (org.apache.openejb.jee.ResourceAdapter)4 ConnectionFactory (javax.resource.cci.ConnectionFactory)3 ManagedConnectionFactory (javax.resource.spi.ManagedConnectionFactory)3 Module (org.apache.openejb.testing.Module)3 AuthenticationMechanism$JAXB.readAuthenticationMechanism (org.apache.openejb.jee.AuthenticationMechanism$JAXB.readAuthenticationMechanism)2 AuthenticationMechanism$JAXB.writeAuthenticationMechanism (org.apache.openejb.jee.AuthenticationMechanism$JAXB.writeAuthenticationMechanism)2 ConfigProperty (org.apache.openejb.jee.ConfigProperty)2 ConnectionDefinition$JAXB.readConnectionDefinition (org.apache.openejb.jee.ConnectionDefinition$JAXB.readConnectionDefinition)2 ConnectionDefinition$JAXB.writeConnectionDefinition (org.apache.openejb.jee.ConnectionDefinition$JAXB.writeConnectionDefinition)2 TransactionSupportType$JAXB.parseTransactionSupportType (org.apache.openejb.jee.TransactionSupportType$JAXB.parseTransactionSupportType)2 TransactionSupportType$JAXB.toStringTransactionSupportType (org.apache.openejb.jee.TransactionSupportType$JAXB.toStringTransactionSupportType)2 RuntimeContext (org.metatype.sxc.jaxb.RuntimeContext)2 File (java.io.File)1 IOException (java.io.IOException)1 URL (java.net.URL)1 Properties (java.util.Properties)1 ValidatingManagedConnectionFactory (javax.resource.spi.ValidatingManagedConnectionFactory)1