Configuration of connection factories

The Java™ EE Connector Architecture (JCA) 1.5 supports multiple connection factories for one resource adapter.

As stated in the JCA 1.5 specification, a resource adapter instance can provide connectivity to multiple instances of Enterprise Information Systems (EIS). Based on the properties that are configured on the ManagedConnectionFactory instance, each instance of ManagedConnectionFactory creates connections to a specific EIS instance.

You can use a resource adapter to configure multiple ManagedConnectionFactory instances which create connections to different instances of the same underlying EIS type. However, you specify the configurable properties only once in the deployment descriptor. In other words, JCA 1.5 supports the definition of multiple connection factories for each resource adapter. Most application servers allow only one dedicated connection pool for each connection factory.

You can create multiple instances of the connection factory by using the specific deployment descriptor for your application server. The ra.xml descriptor file for execution units (XU) contains the declaration of the connection factory properties (name, default value, and type). You must declare the XU plug-in properties in the connection factory property.

The Rule Execution Server console uses a management MBean to retrieve XU logs and XU statistics, and to notify the XU that a ruleset has been added, removed, or modified. If you define multiple connection factories for the XU, only one definition must use the management MBean class, which notifies the XU of any ruleset modification. To register the management MBean in the descriptor, you can use the Management alias:
{pluginClass=Management,xuName=managementXU}
The other connection definitions must use the monitoring MBean class, which only allows to retrieve XU log and statistics:
{pluginClass=Monitoring,xuName=monitoringXU}

The xuName property of the MBean plug-in must be unique for an instance of an application server. If the XU is deployed several times in the same instance of an application server, you must change the xuName value to avoid conflicts in the Rule Execution Server console.

For each application server, the deployment descriptor of a connector can overwrite the default values of the properties.
  • In WebLogic Server and JBoss, you use the ra.xml deployment descriptor file.
  • In WebSphere® Application Server, you must use the JACL scripting language.
  • In WebSphere Application Server and WebLogic Server, you can also add an instance of a connection factory and modify the properties of a factory by using the administration console.
For more information: