Ce contenu n'est pas disponible dans la langue sélectionnée.
Chapter 4. Resource Adapter Development
4.1. Developing Custom Adapters Copier lienLien copié sur presse-papiers!
Copier lienLien copié sur presse-papiers!
For situations in which an existing JCA Adapter (or other connector mechanism) is not suitable, JBoss Data Virtualization provides a framework for developing custom JCA Adapters.
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 JBoss Data Virtualization API. The JCA CCI (Common Client Interface) support is not provided because 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 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
BasicManagedConnectionFactoryclass - Define a Connection Factory by extending the
BasicConnectionFactoryclass - Define a Connection by extending the
BasicConnectionclass - Specify configuration properties in an
ra.xmlfile
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 JBoss Data Virtualization VERSION Source Code ZIP file. This ZIP file can be downloaded from the Red Hat Customer Portal at https://access.redhat.com.