12.11.2014 Views

web server - Borland Technical Publications

web server - Borland Technical Publications

web server - Borland Technical Publications

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Resource Adapter overview<br />

Note<br />

ResourceVaultGen cannot be used to write vault information to an existing file containing<br />

invalid characters. For example, a file generated by 'touch', or a StarOffice or Word<br />

document. ResourceVaultGen can only write vault information to a new file that it itself<br />

generates, or a valid existing vault file.<br />

Resource Adapter overview<br />

According to the Connectors 1.0 specification, you must be able to deploy a Resource<br />

Archive (RAR) as part of an Enterprise Archive (EAR). With BES AppServer Edition<br />

and VisiConnect you can also deploy a standalone RAR. Once the RAR is deployed,<br />

you must do the following:<br />

■<br />

■<br />

■<br />

■<br />

Write code to obtain a connection.<br />

Create an Interaction object.<br />

Create an Interaction Spec.<br />

Create record and/or result set instances.<br />

■<br />

Run the execute command so the record objects become populated.<br />

In addition to some introductory conceptual information, this chapter provides steps to<br />

help you understand the code you must write.<br />

The J2EE Connector Architecture enables Enterprise Information System (EIS)<br />

vendors and third-party application developers to develop Resource Adapters that can<br />

be deployed to any J2EE 1.3 compliant application <strong>server</strong>. The Resource Adapter is<br />

the main component of the J2EE Connector Architecture (Connectors), providing<br />

platform-specific integration between J2EE application components and the EIS. When<br />

a Resource Adapter is deployed to the <strong>Borland</strong> Enterprise Server, it enables the<br />

development of robust J2EE applications which can access a wide variety of<br />

heterogeneous EISs. Resource Adapters encapsulate the Java components and, if<br />

necessary, the native components required to interact with the EIS.<br />

Development overview<br />

See “Developing the Resource Adapter” on page 268 for more information.<br />

Developing a Resource Adapter from scratch requires implementing the necessary<br />

interfaces and deployment descriptors, packaging these into a Resource Adapter<br />

Archive (RAR), and finally deploying the RAR to the <strong>Borland</strong> Enterprise Server. The<br />

following summarizes the main steps for developing a Resource Adapter:<br />

1 Write Java code for the various interfaces and classes required by the Resource<br />

Adapter within the scope of the Connectors 1.0 specification.<br />

2 Specify these classes in the ra.xml standard deployment descriptor file.<br />

3 Compile the Java code for the interfaces and implementation into class files.<br />

4 Package the Java classes into a Java Archive (JAR) file.<br />

5 Create the Resource Adapter-specific deployment descriptors:<br />

■<br />

■<br />

ra.xml: describes the Resource Adapter-related attributes and deployment<br />

properties using the Sun standard DTD.<br />

ra-borland.xml: add additional <strong>Borland</strong> Enterprise Server-specific deployment<br />

information. This file contains the parameters for connection factories, connection<br />

pools, and security mappings.<br />

6 Create the Resource Adapter Archive (RAR) file (that is, package the Resource<br />

Adapter)<br />

264 BES Developer’s Guide

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

Saved successfully!

Ooh no, something went wrong!