user manual

Chapter 27: Using VisiConnect 299
Resource Adapter Overview
a JAR containing Java classes that implement the Resource Adapter
a META-INF directory containing the files Manifest.mf and ra.xml
1 Create the ra-borland.xml file using the Borland Deployment Descriptor
Editor (DDEditor) and save it into the staging area's META-INF directory. See
Using the Deployment Descriptor Editor in the Borland Enterprise Server
User's Guide for information on using the DDEditor.
2 Create the new Resource Adapter Archive
jar cvf shmeAdapter.rar -C c:/temp/staging
3 You may now deploy the Resource Adapter to the Borland Enterprise
Server.
Resource Adapter Packaging
The Resource Adapter is a J2EE component contained in a RAR. Resource
Adapters use a common directory format. The following is an example of a
Resource Adapter's directory structure:
Resource Adapter Directory Structure:
.META-INF/ra.xml
.META-INF/ra-borland.xml
./images/shmeAdapter.jpg
./readme.html
./shmeAdapter.jar
./shmeUtilities.jar
./shmeEisSdkWin32.dll
./shmeEisSdkUnix.so
As shown in the structure above, the Resource Adapter can include
documentation and related files not directly used by the Resource Adapter--for
example, the image and readme files. Packaging the Resource Adapter
means packaging these files as well.
Packaging a Resource Adapter includes the following steps:
1 Create a temporary staging directory.
2 Compile the Resource Adapter Java classes into the staging directory. (Or,
as above, simply copy pre-compiled classes into the staging directory.)
3 Create a JAR file to store the Resource Adapter Java classes. Add this JAR
to the top level of the staging directory.
4 Create a META-INF subdirectory in the staging area.
5 Create a ra.xml deployment descriptor in this subdirectory and add entries
for the Resource Adapter. Refer to Sun Microsystems' documentation for
information on the ra.xml document type definition, at http://java.sun.com/
dtd/connector_1_0.dtd.
6 Create a ra-borland.xml deployment descriptor in this same META-INF
subdirectory and add entries for the Resource Adapter. Refer to the DTD at
the end of this document for details on the necessary entries.