Red Hat Training

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

Chapter 2. Resource Adapter Development

2.1. Developing Custom Adapters

For situations in which an existing JCA Adapter (or other connector mechanism) is not suitable, Red Hat JBoss Data Virtualization provides a framework for developing custom JCA Adapters.
Red Hat JBoss Data Virtualization uses standard JCA Adapters. Base classes for all of the required supporting JCA SPI (Service Provider Interface) classes are provided by the Red Hat JBoss Data Virtualization API. The JCA CCI (Common Client Interface) support is not provided because Red Hat JBoss Data Virtualization uses the translator API as its common client interface.

Note

If you are not familiar with the JCA API, read the JCA 1.5 Specification at http://docs.oracle.com/cd/E15523_01/integration.1111/e10231/intro.htm.
The process for developing a Red Hat JBoss Data Virtualization JCA Adapter is as follows (the required classes can be found in org.teiid.resource.spi):
  • Define a Managed Connection Factory by extending the BasicManagedConnectionFactory class
  • Define a Connection Factory by extending the BasicConnectionFactory class
  • Define a Connection by extending the BasicConnection class
  • Specify configuration properties in an ra.xml file

Note

The examples contained in this book are simplified and do not include support for transactions or security which would add significant complexity.
For sample resource adapter code, see the teiid/connectors directory of the Red Hat JBoss Data Virtualization 6.4 Source Code ZIP file. This ZIP file can be downloaded from the Red Hat Customer Portal at https://access.redhat.com.