7.4. Configuring Generic JCA Adaptors

The XSLSubDeployer also supports the deployment of arbitrary non-JDBC JCA resource adaptors. The schema for the top-level connection factory elements of the *-ds.xml configuration deployment file is shown in Figure 7.11, “The simplified JCA adaptor connection factory configuration descriptor top-level schema elements”.
The simplified JCA adaptor connection factory configuration descriptor top-level schema elements

Figure 7.11. The simplified JCA adaptor connection factory configuration descriptor top-level schema elements

Multiple connection factory configurations may be specified in a configuration deployment file. The child elements of the connection-factories root are:
  • mbean: Any number mbean elements may be specified to define MBean services that should be included in the jboss-service.xml descriptor that results from the transformation. This may be used to configure additional services used by the adaptor.
  • no-tx-connection-factory: this element is used to specify the (org.jboss.resource.connectionmanager) NoTxConnectionManager service configuration. NoTxConnectionManager is a JCA connection manager with no transaction support. The no-tx-connection-factory child element schema is given in Figure 7.12, “The no-tx-connection-factory element schema”.
  • tx-connection-factory: this element is used to specify the (org.jboss.resource.connectionmanager) TxConnectionManager service configuration. The tx-connection-factory child element schema is given in Figure 7.13, “The tx-connection-factory element schema”.
The no-tx-connection-factory element schema

Figure 7.12. The no-tx-connection-factory element schema

The tx-connection-factory element schema

Figure 7.13. The tx-connection-factory element schema

The majority of the elements are the same as those of the datasources configuration. The element unique to the connection factory configuration include:
  • adaptor-display-name: A human readable display name to assign to the connection manager MBean.
  • local-transaction: This element specifies that the tx-connection-factory supports local transactions.
  • xa-transaction: This element specifies that the tx-connection-factory supports XA transactions.
  • track-connection-by-tx: This element specifies that a connection should be used only on a single transaction and that a transaction should only be associated with one connection.
  • rar-name: This is the name of the RAR file that contains the definition for the resource we want to provide. For nested RAR files, the name would look like myapplication.ear#my.rar.
  • connection-definition: This is the connection factory interface class. It should match the connectionfactory-interface in the ra.xml file.
  • config-property: Any number of properties to supply to the ManagedConnectionFactory (MCF) MBean service configuration. Each config-property element specifies the value of a MCF property. The config-property element has two required attributes:
    • name: The name of the property
    • type: The fully qualified type of the property
    The content of the config-property element provides the string representation of the property value. This will be converted to the true property type using the associated type PropertyEditor.