On This Page:
JMS Components
MC2 provides out-of-box configuration. All predefined components are stored in a single file. However, you can extend the number of JMS components by creation of new component-*.json file similar to the one described below.
The configuration files of JMS components (components.json) are stored in this path:
Path to components
estar/tpe/dynamic/mc2/eaglejms/components/*.json
Warning
Do NOT use underscore character ("_") in JMS component and JMS connection names in JSON.
This is common configuration format of components.json:
JMS Connection Configuration
Configuration files of JMS connections are stored by this path:
Path to connections
estar/tpe/dynamic/mc2/eaglejms/connections/*.json
This is an example of the format of JMS configuration of connections:
{ "Region": "Specific Oracle SID of the region", /*Specific Oracle SID of region name to which this config belongs*/ "Connections": [ { "ConnectionName": "mywmq.connection", /* do NOT use underscore character ("_") in name*/ "ComponentName": "wmq", /* reference to component name defined in components.json */ "Parameters": { // Some specific parameters "port": 1415, "ctransportType": 1 , "clientID": "client ID" /* sets Client ID */ }, /* JNDI has a higher priority: if not null then this object will be used as a JMS connection factory */ //"JndiConnectionFactory": "my.jndi.connection.factory1" } ] }
Future implementation
JndiConnectionFactory - property is not supported yet.
You may need to make a JMS Connection configuration for more than one JMS Component, for instance, when you interact with more than one JMS broker. In this case, you must add one more section in connection.json config, as shown in the example below:
{ "Region": "Specific Oracle SID of the region", /*Specific Oracle SID of region name to which this config belongs*/ "Connections": [ { // First connection "ConnectionName": "my.FIRST.amq.connection", /* do NOT use underscore character ("_") in name*/ "ComponentName": "amq", /* reference to component name defined in components.json */ /* JNDI has a higher priority: if not null then this object will be used as a JMS connection factory */ //"JndiConnectionFactory": "my.jndi.connection.factory", "Parameters": { "brokerURL": "tcp://*****.eagleinvsys.com:61616" /* connection url (AMQ): Host name or IP + port */ } }, { // Second connection config "ConnectionName": "my.jndi.wmq.connection", /* do NOT use underscore character ("_") in name*/ "ComponentName": "wmq", /* reference to component name defined in components.json */ "Parameters": { // Some specific parameters "transportType": 1, "port": 1414, "channel": "", "queueManager": "", "HostName": "" } /* JNDI has a higher priority: if not null then this object will be used as a JMS connection factory */ //"JndiConnectionFactory": "my.jndi.connection.factory" } ] }
Important Notes
- ConnectionName - all connection names must be unique
- ComponentName - Component names are defined in the components.json configuration file.
- All other parameters must be specific for your purpose.
Consider the following example of adding a User Name and Password, if you had to connect to JMS broker with your credentials:
{ "Region": "Specific Oracle SID of the region", /*Specific Oracle SID of region name to which this config belongs*/ "Connections": [ { "ConnectionName": "myactivemq.connection", "ComponentName": "eagle-amq", "Parameters": { "brokerURL": "tcp://xxxxxx.eagleinvsys.com:61616", /* connection url: Host name or IP + port */ "UserName": "#{stream:USERID}", /* just copy it as is - it will be JMS Connection User value from Stream parameters*/ "Password": "#{stream:USERPASSWORD}" /* just copy it as is - it will be JMS Connection Password value from Stream parameters*/ }, /* JNDI has a higher priority: if not null then this object will be used as a JMS connection factory */ //"JndiConnectionFactory": "my.jndi.connection.factory1" } ] }
External Vendor Libraries
In most cases, to enable JMS Messaging, you need to make all dependencies available to MC2.
All external dependencies must be stored in eagle/estar/tpe/dynamic/mc2/sharedlibs/.