Red Hat Training

A Red Hat training course is available for Red Hat JBoss Data Virtualization

2.9. Deploying the Adapter

Once the RAR file is built, deploy it using the CLI or Management Console.
Once the adapter's RAR file has been deployed you can create an instance of this connector to use with your Translator. Creating an instance of this adapter is the same as creating a Connection Factory. There are two ways you can do this:
  1. Edit the server configuration file and add the following XML in the "resource-adapters" subsystem.
    <!-- If susbsytem is already defined, only copy the contents under it and edit to suit your needs -->
    <subsystem xmlns="urn:jboss:domain:resource-adapters:1.0">
        <resource-adapters>
            <resource-adapter>
                <archive>teiid-connector-sample.rar</archive>
                <transaction-support>NoTransaction</transaction-support>
                <connection-definitions>
                    <connection-definition class-name="org.teiid.resource.adapter.MyManagedConnectionFactory"  jndi-name="${jndi-name}"
                            enabled="true"
                            use-java-context="true"
                            pool-name="sample-ds">
                          <config-property name="UserName">jdoe</config-property>
                          <config-property name="Count">12</config-property>
                    </connection-definition>
                </connection-definitions>
            </resource-adapter>
        </resource-adapters>
    </subsystem>
    There are more properties that you can define in this file; for example, for pooling, transactions, and security. Refer to the Red Hat JBoss Enterprise Application Platform documentation for all the available properties. See https://access.redhat.com/site/documentation/JBoss_Enterprise_Application_Platform/.
  2. You can use the web-based Management Console to create a new ConnectionFactory.