Programming WebLogic Server J2EE Connectors
The following sections provide a complete reference for the WebLogic Server-specific XML deployment descriptor properties used in the WebLogic Server resource adapter archive and an explanation of how to edit the XML deployment descriptor. Use these sections if you need to refer to the deployment descriptor used for resource adapters.
If your resource adapter archive (RAR) does not contain a weblogic-ra.xml file, WebLogic Server automatically generates this file for you.
To define or make changes to the XML deployment descriptors used in the WebLogic Server resource adapter archive, you must manually define or edit the XML elements in the weblogic-ra.xml file.
To manually edit XML elements:
<max-config-property></max-config-property>
When editing or creating XML deployment files, it is critical to include the correct DOCTYPE
header for each deployment file. In particular, using an incorrect PUBLIC
element within the DOCTYPE
header can result in parser errors that may be difficult to diagnose.
The header refers to the location and version of the Document Type Definition (DTD) file for the deployment descriptor. Although this header references an external URL at java.sun.com
, WebLogic Server contains its own copy of the DTD file, so your host server need not have access to the Internet. However, you must still include this <!DOCTYPE...>
element in your ra.xml
file, and have it reference the external URL because the version of the DTD contained in this element is used to identify the version of this deployment descriptor.
The entire DOCTYPE
headers for the ra.xml and weblogic-ra.xml files are as follows:
|
|
" |
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
'
identifier_name
generally includes the invalid text from the PUBLIC
element.
The contents and arrangement of elements in your XML files must conform to the Document Type Definition (DTD) for each file you use. WebLogic Server utilities ignore the DTDs embedded within the DOCTYPE
header of XML deployment files, and instead use the DTD locations that were installed along with the server. However, the DOCTYPE header information must include a valid URL syntax in order to avoid parser errors.
The following links provide the public DTD locations for XML deployment files used with WebLogic Server:
connector_1_0.dtd
contains the DTD for the standard ra.xml
deployment file, required for all resource adapters. This DTD is maintained as part of the J2EE Connector Specification, Version 1.0; refer to this specification for information about the elements used in the connector_1_0.dtd
(http://java.sun.com/j2ee/download.html#connectorspec).weblogic-ra.dtd
contains the DTD used for creating weblogic-ra.xml
, which defines resource adapter properties used for deployment to WebLogic Server. This file is located at http://www.bea.com/servers/wls810/dtd/weblogic810-ra.dtdNote: Most browsers do not display the contents of files having the .dtd
extension. To view the DTD file contents in your browser, save the links as text files and view them with a text editor.
WebLogic Builder provides a visual environment for editing an application's deployment descriptor XML files. You can view these XML files as you visually edit them in WebLogic Builder, but you won't need to make textual edits to the XML files.
Use WebLogic Builder for the following development tasks:
For instructions on using WebLogic Builder, refer to the WebLogic Builder documentation.
This release of WebLogic Server has deprecated the Administration Console Deployment Descriptor Editor. A new Descriptor tab in the Administration Console has replaced it. Using the Descriptor tab, you can view, modify, and persist deployment descriptor elements to the descriptor file within the resource adapter in the same manner that they were persisted using the Deployment Descriptor Editor.
However, these descriptor elements takes place dynamically at runtime without requiring the resource adapter to be redeployed. The descriptor elelements contained in the Descriptor tab are limited to only those descriptor elements that may be dynamically changed at runtime. These include the following weblogic-ra.xml elements:
The following sections describe each of the elements that can be defined in the weblogic-ra.xml file.
The weblogic-connection-factory-dd
element is the root element of the WebLogic-specific deployment descriptor for the deployed resource adapter.
The following table describes the elements you can define within a weblogic-connection-factory-dd
element.
Defines the logical name that will be associated with this specific deployment of the resource adapter and its corresponding connection factory. The value of this element can be used in other deployed resource adapters through the ra-link-ref element, allowing multiple deployed Connection Factories to utilize a common deployed resource adapter, as well as share configuration specifications. |
||
Provides text describing the parent element. This element should include any information that the deployer wants to describe about the deployed Connection Factory. |
||
Defines the name that will be used to bind the Connection Factory Object into the WebLogic JNDI Namespace. Client EJBs and Servlets use the same JNDI in their defined Reference Descriptor elements of the WebLogic-specific deployment descriptors. |
||
Allows for the logical association of multiple deployed connection factories with a single deployed resource adapter. The specification of the optional ra-link-ref element with a value identifying a separately deployed connection factory will result in this newly deployed connection factory sharing the resource adapter that has been deployed with the referenced connection factory. In addition, any values defined in the referred connection factories deployment will be inherited by this newly deployed connection factory unless specified. |
||
Identifies the directory location to be used for all native libraries present in this resource adapter deployment. As part of deployment processing, all encountered native libraries will be copied to the location specified. It is the responsibility of the administrator to perform the necessary platform actions such that these libraries will be found during WebLogic Server run time. |
||
The root element for providing connection pool-specific parameters for this connection factory. WebLogic Server uses these specifications in controlling the behavior of the maintained pool of managed connections. Failure to specify this element or any of its specific element items will result in default values being assigned. Refer to the description of each individual element for the designated default value. For more information on the elements of <pool-params>, refer to pool-params |
||
Indicates whether or not the log writer is set for either the ManagedConnectionFactory or ManagedConnection. If this element is set to true, output generated from either the ManagedConnectionFactory or ManagedConnection will be sent to the file specified by the log-filename element. Failure to specify this value will result in WebLogic Server using its defined default value. |
||
Specifies the name of the log file from which output generated from the ManagedConnectionFactory or a ManagedConnection is sent. |
||
Identifies a configuration property name and value that corresponds to an ra.xml config-entry element with the corresponding config-property-name. At deployment time, all values present in a map-config-property specification will be set on the ManagedConnectionFactory. Values specified via a map-config-property will supersede any default value that may have been specified in the corresponding ra.xml config-entry element. For more information on the elements of <map-config-property>, refer to map-config-property. |
||
This is a deprecated element. Provides a mechanism to define appropriate resource-principal values for resource adapter and EIS authorization processing, based upon the known WebLogic run time initiating-principal. This map allows for the specification of a defined set of initiating principals and the corresponding resource principal's username and password that should be used when allocating managed connections and connection handles. A default resource-principal can be defined for the connection factory via the map. By specifying an initiating-principal value of `*' and a corresponding resource-principal, the defined resource-principal will be utilized whenever the current identity is not matched elsewhere in the map. This is an optional element, however, it must be specified in some form if container managed sign-on is supported by the resource adapter and used by any client. In addition, the deployment-time population of the connection pool with managed connections will be attempted using the defined `default' resource principal if one is specified. For more information on the elements of <security-principal-map>, refer to security-principal-map. |
The following table describes the elements you can define within a pool-params
element.
The following table describes the elements you can define within a map-config-property
element.
The following table describes the elements you can define within a security-principal-map
element.