Overview of JCA configuration elements
The Java Platform, Enteprise Edition Connector Architecture (JCA) feature provides configuration elements to define instances of connection factories, administered objects, and activation specifications, and to associate these instances with an installed resource adapter. Each of the JCA configuration elements consists of two basic parts, a top-level element and a subelement, both of which are required for the configured instance.
A top-level element configures general capabilities provided by the Liberty profile server, such as JNDI name, connection management, and container authentication. A subelement ties the instance to an installed resource adapter and enables us to specify vendor-defined configuration properties.
Generic JCA pre-defined top-level configuration elements:
- connectionFactory
- adminObject
- activationSpec
If the JMS feature is enabled, there are also pre-defined generic configuration elements for JMS:
- jmsConnectionFactory
- jmsQueueConnectionFactory
- jmsTopicConnectionFactory
- jmsDestination
- jmsQueue
- jmsTopic
- jmsActivationSpec
Subelements are generated from the resource adapter deployment descriptor and annotations when the resource adapter is installed. You will not see any documentation of the available subelements in the static documentation for available server configuration elements.
Use the following rules to generate the names of the server configuration subelements:
- If a resource adapter provides exactly one interface within one of the listed categories, such as connectionFactory or adminObject, the subelement is: properties.<rar_identifier>
- If the interface name is unique without the package name, the subelement is: properties.<rar_identifier>.<InterfaceName>
- If the implementation name is unique without the package name, the subelement is: properties.<rar_identifier>.<ImplementationName>
- In other cases, the subelement name is properties.<rar_identifier>.<fully.qualified.InterfaceName> or properties.<rar_identifier>.<fully.qualified.ImplementationName>
The following examples illustrate the case where only one interface within each category is provided by a resource adapter with identifier MyAdapter:
<connectionFactory jndiName="eis/cf1" containerAuthDataRef="auth1"> <properties.MyAdapter portNumber="1234" someVendorProperty="100"/> </connectionFactory> <connectionFactory jndiName="eis/cf2" containerAuthDataRef="auth2"> <properties.MyAdapter portNumber="1234" someVendorProperty="200"/> </connectionFactory><jmsConnectionFactory jndiName="jms/cf"> <properties.MyAdapter serverName="localhost" anotherProperty="40"/> </jmsConnectionFactory><jmsQueueConnectionFactory jndiName="jms/qcf"> <properties.MyAdapter serverName="localhost" vendorProp1="1"/> </jmsQueueConnectionFactory><jmsTopicConnectionFactory jndiName="jms/tcf"> <properties.MyAdapter serverName="localhost" prop1="A" prop2="B"/> </jmsTopicConnectionFactory><adminObject jndiName="eis/interactionSpec"> <properties.MyAdapter functionName="find" executionTimeout="5000"/> </adminObject><jmsDestination jndiName="jms/destination1"> <properties.MyAdapter name="DEST1"/> </jmsDestination><jmsQueue jndiName="jms/queue1"> <properties.MyAdapter queueName="QUEUE1"/> </jmsQueue><jmsTopic id="topic1" jndiName="jms/topic1"> <properties.MyAdapter topicName="TOPIC1"/> </jmsTopic><activationSpec id="app1/module1/MyMessageDrivenBean"> <properties.MyAdapter prop1="a" prop2="b" prop3="c"/> </activationSpec><jmsActivationSpec id="app1/module1/MyJMSMessageDrivenBean"> <properties.MyAdapter destinationRef="topic1"/> </jmsActivationSpec>
Subtopics
Configure resource adapters
We can configure resource adapters that comply with the Java EE Connector Architecture (JCA) specification versions 1.6, 1.5, or 1.0.
Configure JCA connection factories
We can configure connection factories that comply with Java EE Connector Architecture (JCA) specification.
Configure JCA administered objects
We can configure administered objects that comply with the Java EE Connector Architecture (JCA) specification.
Configure JCA activation specifications
We can configure activation specifications that comply with the Java EE Connector Architecture (JCA) specification.
Configure JMS connection factories
We can configure JMS connection factories provided by resource adapters that comply with the Java EE Connector Architecture (JCA) specification.
Configure JMS destinations
We can configure JMS destinations provided by resource adapters that comply with the Java EE Connector Architecture (JCA) specification.
Configure JMS activation specifications
We can configure JMS activation specifications provided by resource adapters that comply with the Java EE Connector Architecture (JCA) specification.
Customize JCA configuration elements
We can customize how JCA properties subelements are generated when installing a resource adapter.
Access stand-alone resource adapters from Java EE applications
We can access stand-alone resource adapters from Java EE applications.
Parent topic:
Configure and deploying a basic JCA ResourceAdapter