Following are the steps to configure a TIBCO EMS JMS Destination in CA API Gateway.
Before configuring the queues, please make sure if the TIBCO jars are in the class path of the Gateway. If not follow the below steps.
Steps to add TIBCO EMS jars on the Gateway classpath:
Login as privileged user and s(witch)u(user) as appropriate.
- Copy the following jars on to the Gateway appliance as ssgconfig user.
- Move the above jars to /opt/SecureSpan/Gateway/runtime/lib/ext. Note: There is a possibility that existence of jars 6 & 7 might lead to conflicts with the classes already in the classpath. In case you find any errors in restart please remove jars 6 & 7 from the classpath
- Change ownership of all the jars to layer7:layer7
- Change permission of the jars to 444
- Restart the gateway service by running the command: #service ssg restart
Ensure restart has been successful.
Configuring the inbound JMS destination
- On Policy Manager click Tasks -> Manage JMS Destinations -> Add
- Set the name, e.g. 'tibems'
- Set the "Direction" as "Inbound"
- Set the "Provider Type" as "TIBCO EMS"
- Select the "JNDI" tab.
- Set the "Initial Context Factory class name" as "com.tibco.tibjms.naming.TibjmsInitialContextFactory"
- Set the "JNDI URL" as "tibjmsadmin://<ip-or-host-name>:7222"
- Select the "Destination" tab.
- Set the "Connection Factory Name" e.g. QueueConnectionFactory. Please see steps to verify TIBCO EMS JNDI Names.
- Set the "Destination Name". Please see steps to verify TIBCO EMS JNDI Names.
- Click "Test Settings" button
- To define additional behaviour click 'Inbound Options' tab
- In case the message has to be routed to a service, select "Associate destination with published service (bypass resolution)" Service Resolution and select the service to be invoked from the drop down.
- In the policy you could route the message to another destination, invoke a web service call or log the messages as per the requirement.
- More complex routing options are also available for selection.
- Test the settings again and Save the destination.
You have now set up a successful connection with TIBCO EMS which invokes a Gateway service.
Steps to verify TIBCO EMS JNDI Names
From Tibco Admin
- Command “show factories” tells us the mapping from JNDI name to the factory
- Command “show jndinames” tells us the JNDI name to actual resource
QueueConnectionFactory QCF tcp://7222
- If the destination name configured above is 'queue1', then there should be a listing of the queue with JNDI Name 'queue1' in the 'show jndinames'.
- In case the queue is not bound to the JNDI tree or a new queue is being created, it has to be bound as below
create jndiname 'queue1' queue <queue-name>
Possible issue when connecting to TIBCO EMS via JNDI:
- The JNDI look up can return a hostname of the ems which may be unrecognised at the client side
- To resolve a host name to IP, an entry to /etc/hosts must be added on the Gateway