12.11.2014 Views

web server - Borland Technical Publications

web server - Borland Technical Publications

web server - Borland Technical Publications

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Resource Adapter overview<br />

7 Deploy the Resource Adapter Archive to the <strong>Borland</strong> Enterprise Server, or include it<br />

in an Enterprise Application Archive (EAR) file to be deployed as part of a J2EE<br />

application.<br />

Editing existing Resource Adapters<br />

If you have existing Resource Adapters you would like to deploy to the <strong>Borland</strong><br />

Enterprise Server, it may only be necessary to edit the <strong>Borland</strong>-specific deployment<br />

descriptor described above and repackage the adapter. Doing so involves the following<br />

steps, with illustrative example:<br />

1 Create an empty staging directory for the RAR:<br />

mkdir c:/temp/staging<br />

2 Copy the Resource Adapter to be deployed into the staging directory:<br />

cp shmeAdapter.rar c:/temp/staging<br />

3 Extract the contents of the Resource Adapter Archive:<br />

jar xvf shmeAdapter.rar<br />

The staging directory should now contain the following:<br />

■<br />

■<br />

a JAR containing Java classes that implement the Resource Adapter<br />

a META-INF directory containing the files Manifest.mf and ra.xml<br />

1 Create the ra-borland.xml file using the <strong>Borland</strong> Deployment Descriptor Editor<br />

(DDEditor) and save it into the staging area's META-INF directory. See the User’s<br />

Guide for information on using the DDEditor.<br />

2 Create the new Resource Adapter Archive<br />

jar cvf shmeAdapter.rar -C c:/temp/staging<br />

3 You may now deploy the Resource Adapter to the <strong>Borland</strong> Enterprise Server.<br />

Resource Adapter Packaging<br />

The Resource Adapter is a J2EE component contained in a RAR. Resource Adapters<br />

use a common directory format. The following is an example of a Resource Adapter's<br />

directory structure:<br />

Resource Adapter Directory Structure:<br />

.META-INF/ra.xml<br />

.META-INF/ra-borland.xml<br />

./images/shmeAdapter.jpg<br />

./readme.html<br />

./shmeAdapter.jar<br />

./shmeUtilities.jar<br />

./shmeEisSdkWin32.dll<br />

./shmeEisSdkUnix.so<br />

As shown in the structure above, the Resource Adapter can include documentation<br />

and related files not directly used by the Resource Adapter--for example, the image<br />

and readme files. Packaging the Resource Adapter means packaging these files as<br />

well.<br />

Packaging a Resource Adapter includes the following steps:<br />

1 Create a temporary staging directory.<br />

2 Compile the Resource Adapter Java classes into the staging directory. (Or, as<br />

above, simply copy pre-compiled classes into the staging directory.)<br />

Chapter 27: Using VisiConnect 265

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!