Creating and Configuring Resource Adapters 3-5
■
Chapter 7, Message and Transactional Inflow
■
Chapter 8, Security
3.4.1 Editing Resource Adapter Deployment Descriptors
To define or make changes to the XML descriptors used in the WebLogic Server resource adapter archive, you must define or edit the XML elements in the
weblogic-ra.xml and ra.xml deployment descriptor files. You can edit the
deployment descriptor files with any plain text editor. However, to avoid introducing errors, use a tool designed for XML editing.You can also edit most elements of the files
using the WebLogic Administration Console.
3.4.1.1 Editing Considerations
To edit XML elements manually:
■
If you use an ASCII text editor, make sure that it does not reformat the XML or insert additional characters that could invalidate the file.
■
Use the correct case for file and directory names, even if your operating system ignores the case.
■
To use the default value for an optional element, you can either omit the entire element definition or specify a blank value. For example:
max-config-propertymax-config-property
3.4.1.2 Schema Header Information
When editing or creating XML deployment files, it is critical to include the correct schema header for each deployment file. The header refers to the location and version
of the schema for the deployment descriptor.
Although this header references an external URL at java.sun.com, WebLogic Server contains its own copy of the schema, so your host server need not have access to the
Internet. However, you must still include this ?xml version... element in your ra.xml
file, and have it reference the external URL because the version of the schema contained in this element is used to identify the version of this deployment descriptor.
Table 3–1 shows the entire schema headers for the ra.xml and weblogic-ra.xml
files.
XML files with incorrect header information may yield error messages similar to the following, when used with a utility that parses the XML such as ejbc:
SAXException: This document may not have the identifier identifier_name
Table 3–1 Schema Header
XML File Schema Header
ra.xml ?xml version=1.0 encoding=UTF-8?
connector xmlns=http:java.sun.comxmlnsj2ee xmlns:xsi=http:www.w3.org2001XMLSchema-instance
xsi:schemaLocation=http:java.sun.comxmlnsj2ee http:java.sun.comxmlnsj2eeconnector_1_5.xsd
version=1.5 weblogic-ra.xml
?xml version = 1.0 weblogic-connector
xmlns=http:xmlns.oracle.comweblogicweblogic-connector
3-6 Programming Resource Adapters for Oracle WebLogic Server
3.4.1.3 Conforming Deployment Descriptor Files to Schema
The contents and arrangement of elements in your deployment descriptor files must conform to the schema for each file you use. The following links provide the public
schema locations for deployment descriptor files used with WebLogic Server:
■
connector_1_5.xsd contains the schema for the standard ra.xml deployment
file, required for all resource adapters. This schema is maintained as part of the J2CA 1.5 Specification and is located at
http:java.sun.comxmlnsj2eeconnector_1_5.xsd .
■
weblogic-ra.xsd contains the schema used for creating weblogic-ra.xml,
which defines resource adapter properties used for deployment to WebLogic Server. This schema is located at
http:xmlns.oracle.comweblogicweblogic-connector1.0weblo gic-connector.xsd
.
3.4.2 Dynamic Descriptor Updates: Console Configuration Tabs