## Description

This controller service serves as a general factory service to serving vendor specific instances of the jakarta.jms.ConnectionFactory. It does so by allowing user to configure vendor specific properties as well as point to the location of the vendor provided JMS client libraries so the correct implementation of the jakarta.jms.ConnectionFactory can be found, loaded, instantiated and served to the dependent processors (see PublishJMS, ConsumeJMS).

All JMS vendors and ConnectionFactory implementations are supported as long as the configuration values can be set through set methods (detailed explanation in the last paragraph). However some helpful accommodation are done for the following JMS vendors:

- Apache ActiveMQ
- IBM MQ
- TIBCO EMS
- Qpid JMS (AMQP 1.0)

This controller service exposes only a single mandatory static configuration property that are required across all implementations. The rest of the configuration properties are either optional or vendor specific.

The mandatory configuration property is:

- JMS Connection Factory Implementation - The fully qualified name of the JMS ConnectionFactory implementation class. For example:
  - Apache ActiveMQ - org.apache.activemq.ActiveMQConnectionFactory
  - IBM MQ - com.ibm.mq.jms.MQQueueConnectionFactory
  - TIBCO EMS - com.tibco.tibjms.TibjmsQueueConnectionFactory
  - Qpid JMS (AMQP 1.0) - org.apache.qpid.jms.JmsConnectionFactory

The following static configuration properties are optional but required in many cases:

- JMS Client Libraries - Path to the directory with additional resources (eg. JARs, configuration files, etc.) to be added to the classpath (defined as a comma separated list of values). Such resources typically represent target JMS client libraries for the ConnectionFactory implementation.
- JMS Broker URI - URI pointing to the network location of the JMS Message broker. For example:
  - Apache ActiveMQ - tcp://myhost:1234 for single broker and failover:(tcp://myhost01:1234,tcp://myhost02:1234) for multiple brokers.
  - IBM MQ - myhost(1234) for single broker. myhost01(1234),myhost02(1234) for multiple brokers.
  - TIBCO EMS - tcp://myhost:1234 for single broker and tcp://myhost01:7222,tcp://myhost02:7222 for multiple brokers.
  - Qpid JMS (AMQP 1.0) - amqp[s]://myhost:1234 for single broker and failover:(amqp[s]://myhost01:1234,amqp[s]://myhost02:1234) for multiple brokers.

The rest of the vendor specific configuration are set through dynamic properties utilizing the Java Beans convention where a property name is derived from the set method of the vendor specific ConnectionFactory's implementation. For example, com.ibm.mq.jms.MQConnectionFactory.setChannel(String) would imply 'channel' property and com.ibm.mq.jms.MQConnectionFactory.setTransportType(int) would imply 'transportType' property. For the list of available properties please consult vendor provided documentation. Following is examples of such vendor provided documentation:

- Apache ActiveMQ
- IBM MQ
- TIBCO EMS
- Qpid JMS (AMQP 1.0)

Besides the dynamic properties and set methods described in the previous section, some providers also support additional configuration via the Broker URI (as query parameters added to the URI):

- Qpid JMS (AMQP 1.0)

## Sample controller service configuration for IBM MQ

Property | Value | Static/Dynamic | Comments
--- | --- | --- | ---
JMS Connection Factory Implementation | com.ibm.mq.jms.MQQueueConnectionFactory | Static | Vendor provided implementation of QueueConnectionFactory
JMS Client Libraries | /opt/mqm/java/lib | Static | Default installation path of client JAR files on Linux systems
JMS Broker URI | mqhost01(1414),mqhost02(1414) | Static | Connection Name List syntax. Colon separated host/port pair(s) is also supported
JMS SSL Context Service |  | Static | Only required if using SSL/TLS
channel | TO.BAR | Dynamic | Required when using the client transport mode
queueManager | PQM1 | Dynamic | Name of queue manager. Always required.
transportType | 1 | Dynamic | Constant integer value corresponding to the client transport mode. Default value is "Bindings, then client"