Configuring JMS Destination Task with Provider Type: TIBCO EMS

Blog Post created by mtrinath on Jul 25, 2015

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.

  1. Copy the following jars on to the Gateway appliance as ssgconfig user.
    1. jms.jar
    2. tibcrypt.jar
    3. tibjms.jar
    4. tibjmsadmin.jar
    5. tibjmsufo.jar
    6. slf4j-api-1.4.2.jar
    7. slf4j-simple-1.4.2.jar
  2. 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
  3. Change ownership of all the jars to layer7:layer7
  4. Change permission of the jars to 444
  5. Restart the gateway service by running the command: #service ssg restart

Ensure restart has been successful.


Configuring the inbound JMS destination

  1. On Policy Manager click Tasks -> Manage JMS Destinations -> Add
  2. Set the name, e.g. 'tibems'
  3. Set the "Direction" as "Inbound"
  4. Set the "Provider Type" as "TIBCO EMS"
  5. basics.png
  6. Select the "JNDI" tab.
  7. Set the "Initial Context Factory class name" as "com.tibco.tibjms.naming.TibjmsInitialContextFactory"
  8. Set the "JNDI URL" as "tibjmsadmin://<ip-or-host-name>:7222"
  9. jndi.png
  10. Select the "Destination" tab.
  11. Set the "Connection Factory Name" e.g. QueueConnectionFactory. Please see steps to verify TIBCO EMS JNDI Names.
  12. Set the "Destination Name". Please see steps to verify TIBCO EMS JNDI Names.
  13. destination.png
  14. Click "Test Settings" button
  15. To define additional behaviour click 'Inbound Options' tab
  16. 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.
  17. inbound-options.png
  18. In the policy you could route the message to another destination, invoke a web service call or log the messages as per the requirement.
  19. More complex routing options are also available for selection.
  20. 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

        QueueConnectionFactory  "QueueConnectionFactory"

  • 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