user manual

298 BES Developers Guide
Resource Adapter Overview
EISs. Resource Adapters encapsulate the Java components and, if
necessary, the native components required to interact with the EIS.
Development Overview
See Developing the Resource Adapter on page 303, for more information.
Developing a Resource Adapter from scratch requires implementing the
necessary interfaces and deployment descriptors, packaging these into a
Resource Adapter Archive (RAR), and finally deploying the RAR to the
Borland Enterprise Server. The following summarizes the main steps for
developing a Resource Adapter:
1 Write Java code for the various interfaces and classes required by the
Resource Adapter within the scope of the Connectors 1.0 specification.
2 Specify these classes in the ra.xml standard deployment descriptor file.
3 Compile the Java code for the interfaces and implementation into class
files.
4 Package the Java classes into a Java Archive (JAR) file.
5 Create the Resource Adapter-specific deployment descriptors:
ra.xml: describes the Resource Adapter-related attributes and
deployment properties using the Sun standard DTD.
ra-borland.xml: add additional Borland Enterprise Server-specific
deployment information. This file contains the parameters for connection
factories, connection pools, and security mappings.
6 Create the Resource Adapter Archive (RAR) file (that is, package the
Resource Adapter)
7 Deploy the Resource Adapter Archive to the Borland Enterprise Server, or
include it in an Enterprise Application Archive (EAR) file to be deployed as
part of a J2EE application.
Editing existing Resource Adapters
If you have existing Resource Adapters you would like to deploy to the Borland
Enterprise Server, it may only be necessary to edit the Borland-specific
deployment descriptor described above and repackage the adapter. Doing so
involves the following steps, with illustrative example:
1 Create an empty staging directory for the RAR:
mkdir c:/temp/staging
2 Copy the Resource Adapter to be deployed into the staging directory:
cp shmeAdapter.rar c:/temp/staging
3 Extract the contents of the Resource Adapter Archive:
jar xvf shmeAdapter.rar
The staging directory should now contain the following: