web server - Borland Technical Publications
web server - Borland Technical Publications web server - Borland Technical Publications
Resource Adapter overview 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: ■ ■ 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 the 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.) Chapter 27: Using VisiConnect 265
Deployment Descriptors for the Resource Adapter 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. 7 Create the Resource Adapter Archive: jar cvf resource-adapter-archive.rar -C staging-directory This command creates a RAR file that you can deploy to the server. The -C stagingdirectory option instructs the JAR command to change to the staging-directory so that the directory paths recorded in the RAR file are relative to the directory where the Resource Adapters were staged. One or more Resource Adapters can be staged in a directory and packaged in a JAR file. Deployment Descriptors for the Resource Adapter The Borland Enterprise Server uses two XML files to specify deployment information. The first of these is ra.xml, based on Sun Microsystems' DTD for resource adapters. The second is Borland's proprietary ra-borland.xml, which includes additional deployment information necessary for Borland Enterprise Server. Configuring ra.xml If you do not already have an ra.xml file associated with your Resource Adapter, it is necessary to manually create a new one or edit an existing one. You can use a text editor or the Borland DDEditor to edit these properties. For the most up-to-date information on creating an ra.xml file, refer to the Connectors specification at http:// java.sun.com/j2ee/connector. Configuring the transaction level type It is of critical importance that you specify the transaction level type supported by your Resource Adapter in the ra.xml deployment descriptor. The following table shows the transaction levels supported and how they are rendered in XML. Transaction Support Type None Local XA XML representation NoTransaction LocalTransaction XA 266 BES Developer’s Guide
- Page 225 and 226: Obtaining JMS Connection Factories
- Page 227 and 228: JMS and Transactions and its accomp
- Page 229 and 230: JMS and Transactions For instance:
- Page 231 and 232: 220 BES Developer’s Guide
- Page 233 and 234: Configuring JMS administered object
- Page 235 and 236: Tibco Creating Clustered JMS Servic
- Page 237 and 238: Sonic serverUrl String localhost:72
- Page 239 and 240: Sonic Creating Clustered JMS Servic
- Page 241 and 242: OpenJMS Even though OpenJMS can be
- Page 243 and 244: OpenJMS Important If you use OpenJM
- Page 245 and 246: OpenJMS openjms.clean_messages_on_s
- Page 247 and 248: OpenJMS Table 24.1 Property Name De
- Page 249 and 250: Other JMS providers The following a
- Page 251 and 252: 240 BES Developer’s Guide
- Page 253 and 254: Creating the Interceptor Class For
- Page 255 and 256: Creating the JAR file Creating the
- Page 257 and 258: Components Components The Connector
- Page 259 and 260: System Contracts Connection Managem
- Page 261 and 262: System Contracts Security Managemen
- Page 263 and 264: Common Client Interface (CCI) Conne
- Page 265 and 266: Packaging and Deployment Figure 26.
- Page 267 and 268: Resource Adapters Resource Adapters
- Page 269 and 270: Connection management Connection ma
- Page 271 and 272: Security management with the Securi
- Page 273 and 274: Security management with the Securi
- Page 275: Resource Adapter overview Note Reso
- Page 279 and 280: Developing the Resource Adapter Con
- Page 281 and 282: Deploying the Resource Adapter Pack
- Page 283 and 284: Application development overview 8
- Page 285 and 286: Application development overview //
- Page 287 and 288: Application development overview
- Page 289 and 290: Other Considerations Other Consider
- Page 291 and 292: Other Considerations To illustrate,
- Page 293 and 294: Other Considerations } } { cf = new
- Page 295 and 296: General syntax and usage General sy
- Page 297 and 298: Syntax and usage for iastool Table
- Page 299 and 300: Syntax and usage for java2iiop Exam
- Page 301 and 302: Syntax and usage for appclient Tabl
- Page 303 and 304: Building and running the BES exampl
- Page 305 and 306: Using the iastool command-line tool
- Page 307 and 308: Using the iastool command-line tool
- Page 309 and 310: Using the iastool command-line tool
- Page 311 and 312: Using the iastool command-line tool
- Page 313 and 314: Using the iastool command-line tool
- Page 315 and 316: Using the iastool command-line tool
- Page 317 and 318: Using the iastool command-line tool
- Page 319 and 320: Using the iastool command-line tool
- Page 321 and 322: Using the iastool command-line tool
- Page 323 and 324: Using the iastool command-line tool
- Page 325 and 326: Using the iastool command-line tool
Deployment Descriptors for the Resource Adapter<br />
3 Create a JAR file to store the Resource Adapter Java classes. Add this JAR to the<br />
top level of the staging directory.<br />
4 Create a META-INF subdirectory in the staging area.<br />
5 Create a ra.xml deployment descriptor in this subdirectory and add entries for the<br />
Resource Adapter. Refer to Sun Microsystems' documentation for information on<br />
the ra.xml document type definition, at http://java.sun.com/dtd/connector_1_0.dtd.<br />
6 Create a ra-borland.xml deployment descriptor in this same META-INF subdirectory<br />
and add entries for the Resource Adapter. Refer to the DTD at the end of this<br />
document for details on the necessary entries.<br />
7 Create the Resource Adapter Archive:<br />
jar cvf resource-adapter-archive.rar -C staging-directory<br />
This command creates a RAR file that you can deploy to the <strong>server</strong>. The -C stagingdirectory<br />
option instructs the JAR command to change to the staging-directory so<br />
that the directory paths recorded in the RAR file are relative to the directory where<br />
the Resource Adapters were staged.<br />
One or more Resource Adapters can be staged in a directory and packaged in a<br />
JAR file.<br />
Deployment Descriptors for the Resource Adapter<br />
The <strong>Borland</strong> Enterprise Server uses two XML files to specify deployment information.<br />
The first of these is ra.xml, based on Sun Microsystems' DTD for resource adapters.<br />
The second is <strong>Borland</strong>'s proprietary ra-borland.xml, which includes additional<br />
deployment information necessary for <strong>Borland</strong> Enterprise Server.<br />
Configuring ra.xml<br />
If you do not already have an ra.xml file associated with your Resource Adapter, it is<br />
necessary to manually create a new one or edit an existing one. You can use a text<br />
editor or the <strong>Borland</strong> DDEditor to edit these properties. For the most up-to-date<br />
information on creating an ra.xml file, refer to the Connectors specification at http://<br />
java.sun.com/j2ee/connector.<br />
Configuring the transaction level type<br />
It is of critical importance that you specify the transaction level type supported by your<br />
Resource Adapter in the ra.xml deployment descriptor. The following table shows the<br />
transaction levels supported and how they are rendered in XML.<br />
Transaction Support Type<br />
None<br />
Local<br />
XA<br />
XML representation<br />
NoTransaction<br />
LocalTransaction<br />
XA<br />
266 BES Developer’s Guide