When you deploy a resource adapter archive RAR or deployment directory, you must specify a name for the deployment unit, for example, myResourceAdapter. This name provides a shorthand reference to the resource adapter deployment that you can later use to undeploy or update the resource adapter. When you deploy a resource adapter, WebLogic Server implicitly assigns a deployment name that matches the path and filename of the RAR or deployment directory.
You can use this assigned name to undeploy or update the resource adapter after the server has started. The resource adapter deployment name remains active in WebLogic Server until the server is rebooted. Undeploying a resource adapter does not remove the associated deployment name; you can use the same deployment name to redeploy the resource adapter at a later time. Using WebLogic Server's production redeployment feature, you can redeploy a new version of a WebLogic Server application alongside an older version of the same application.
By default, WebLogic Server immediately routes new client requests to the new version of the application, while routing existing client connections to the older version. After all clients using the older application version complete their work, WebLogic Server retires the older application so that only the new application version is active. Typically, a resource adapter bean implements the javax.
ResourceAdapter interface. This interface defines start and stop methods. This type of resource adapter is not eligible for production redeployment. All communication is performed in a resource adapter-proprietary way with no knowledge of the application server.
If on-the-fly production redeployment is attempted, the application server can only provide notifications to the resource adapter to manage the migration of connections from the existing resource adapter to a new instance. However, the resource adapter can implement the Suspendable interface, which provides the capability to allow resource adapters to participate in production redeployment. All of the following requirements must be met by both the old and new version of the resource adapter in order for production redeployment to work; otherwise, the redeployment fails.
The resource adapter must be based on the J2CA 1. Support for production redeployment of 1. The resource adapter must implement the Suspendable interface see Example The resource adapter must be packaged inside an enterprise application EAR file. Create a staging directory anywhere on your hard drive. Then create the resource adapter archive by executing a jar command similar to the following in the staging directory:. WebLogic Server uses the Bean Validation configuration file to validate the resource adapter module.
During testing, you may need to edit the resource adapter deployment descriptors. For more information about editing deployment descriptors, see Configuring the weblogic-ra. See also Appendix A, "weblogic-ra. In some cases, you may already have a resource adapter available for deployment to WebLogic Server. This section describes how to take an existing resource adapter that is packaged in a RAR file and modify it for deployment to WebLogic Server.
This involves adding the weblogic-ra. The following procedure supposes you have an existing resource adapter packaged in a RAR file named blackbox-notx. Create the weblogic-ra. This file is the WebLogic-specific deployment descriptor for resource adapters. In this file, you specify parameters for connection factories, connection pools, and security settings.
For more information, see Configuring the weblogic-ra. Copy the weblogic-ra. Use the following command:. Deploy the resource adapter to WebLogic Server. All resource adapters must be specified in an ra. If you are creating a 1. The following sections explain how to configure the ra. For more information about creating a ra. If your resource adapter does not already contain a ra.
You can use a text editor or XML editor to edit the properties. Instead, metadata annotations can be included in resource adapter classes to provide the same functions that are specified in the ra. If you choose to specify all deployment information in a ra. Setting the metadata-complete element to true causes all metadata annotations included in the resource adapter classes to be ignored. If the metadata-complete element is not specified, or is set to false , WebLogic Server merges the information specified in the annotations with the information specified in the ra.
For details about schema definition changes, see Section The schema for the ra-xml file for 1. In addition to supporting features of the standard resource adapter configuration ra. This file contains parameters that are specific to configuring and deploying resource adapters in WebLogic Server. If a resource adapter is deployed in WebLogic Server without a weblogic-ra. However, this automatically generated weblogic-ra. The following summarizes the most significant features you can configure in the weblogic-ra.
JNDI name bound to a connection factory. Reference to a separately deployed connection factory that contains resource adapter components that can be shared with the current resource adapter. Number of ManagedConnections that WebLogic Server attempts to allocate when filling a request for a new connection. To start WebLogic Set up a WebLogic server domain and edit the startup script, if you have not already done so. Go to the Start menu for WebLogic and choose the domain and server that you specified in your startup script.
This Start menu item runs the startup script. Open a browser. The resource adapter should also be listed in the hierarchy on the left.
Note: To deploy the local transaction connector mfcobol-localtx. Setting this parameter causes the associated config-property-value element in ra. This is a required element.
This is an optional element. The admin-objects complex element defines all of the admin objects in the resource adapter. As with the outbound-resource-adapter complex element, the admin-objects complex element has three hierarchical property levels that you can specify. The admin-objects element is a sub-element of the weblogic-connector element. You can define the following elements within the admin-objects element.
Table A admin-objects subelements. Specifies the default properties that apply to all admin objects at the global level in the resource adapter. The default-properties element can contain one or more property elements, each holding a name and value pair. See properties. Specifies the default parameters that apply to all admin objects belonging to a particular admin object group specified in the ra. The admin-object-group element is used to define an admin object group. At the group level, you specify parameters that apply to all admin objects belonging to a particular admin object group specified in the ra.
The admin-object-interface element a subelement of the admin-object-group element serves as a required unique element a key to each admin-object-group.
There must be a one-to-one relationship between the weblogic-ra. The admin-object-group element is a sub-element of the weblogic-connector element. You can define the following elements within the admin-object-group element. Table A admin-object-group. The admin-object-interface element serves as a required unique element a key to each admin-object-group. The combination of the admin-object-interface element and the admin-object-class element serves as a required unique element a key to each admin-object-group.
There must be a one-to-one relationship between the following two pairs:. The admin-object-interface and admin-object-class element pair defined in weblogic-ra. Specifies one or more admin object instances within the admin object group, corresponding to the admin object instances for the resource adapter.
You can specify properties at the instance level and override those provided in the group and global levels. For subelements, see admin-object-instance. Table A admin-object-instance subelements. Note: The enable-access-outside-app element must be set to true. The admin-object-properties element can contain one or more property elements, each holding a name and value pair.
The outbound-resource-adapter element is a sub-element of the weblogic-connector element. You can define the following elements within the outbound-resource-adapter element. Table A outbound-resource-adapter subelements. This complex element is used to specify the properties at an global level. At this level, the user is able to specify parameters that apply to all outbound connection pools in the resource adapter.
This element is used to specify all the connection definition groups. There must be a one-to-one correspondence relationship between the connection factories in the ra. A group does not have to exist in the weblogic-ra. However, if a group exists, there must be at least one connection instance in the group. The properties specified in the group override any parameters that are specified at the global level using default-connection-properties.
The default-connection-properties element is a sub-element of the outbound-resource-adapter element. You can define the following elements within the default-connection-properties element. Table A default-connection-properties subelements. Serves as the root element for providing connection pool-specific parameters for this connection factory. WebLogic Server uses these specifications to control the behavior of the maintained pool of ManagedConnections.
Failure to specify this element or any of its specific element items results in default values being assigned. Refer to the description of each individual element for the designated default value. Contains parameters for configuring logging of the ManagedConnectionFactory and ManagedConnection objects of the resource adapter.
Specifies the level of transaction support for a particular Connection Factory. It provides the ability to override the transaction-support value specified in the ra. For related information, see Chapter 6, "Connection Management. The authentication-mechanism element specifies an authentication mechanism supported by a particular Connection Factory in the resource adapter. It provides the ability to override the authentication-mechanism value specified in the ra.
Note that BasicPassword mechanism type should support the javax. PasswordCredential interface. A Boolean that specifies whether a particular connection factory supports re-authentication of an existing ManagedConnection instance. It provides the ability to override the reauthentication-support value specified in the ra.
The properties element includes one or more property elements, which define name and value subelements that apply to the default connections. Specifies whether to use container- or application-managed security. The values for this element can be one of Application or Container. The default value is Container. The pool-params element is a sub-element of the default-connection-properties element. You can define the following elements within the pool-params element. Table A pool-params subelements.
Specifies the initial number of ManagedConnections, which WebLogic Server attempts to create during deployment. Requests for newly allocated ManagedConnections beyond this limit results in a ResourceAllocationException being returned to the caller.
Specifies the maximum number of additional ManagedConnections that WebLogic Server attempts to create during resizing of the maintained connection pool. Specifies whether unused ManagedConnections will be destroyed and removed from the connection pool as a means to control system resources. Specifies the amount of time in seconds the Connection Pool Management waits between attempts to destroy unused ManagedConnections. Specifies the maximum number of threads that can concurrently block waiting to reserve a connection from the pool.
Specifies the maximum number of ManagedConnections in the pool that can be made unavailable to the application for purposes such as refreshing the connection. Note that in cases like the backend system being unavailable, this specified value could be exceeded due to factors outside the pool's control. Sets the number of seconds after which the call to reserve a connection from the pool will timeout.
When the connection pool is being shut down, this element is used to specify whether it is acceptable to ignore connections that are in use at that time. Indicates whether the resource adapter supports the ManagedConnectionFactory. If the resource adapter does not support this method always returns null for this method , then WebLogic Server bypasses this method call during a connection request. The logging element is a sub-element of the default-connection-properties element.
You can define the following elements within the logging element. Table A logging subelements. Specifies the name of the log file from which output generated from the ManagedConnectionFactory or a ManagedConnection is sent. 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.
0コメント