How to configure a Liberty application server to connect to TIBCO EMS using JNDI lookup?

134 Views Asked by At

I am trying to configure JNDI for Tibco EMS in Liberty Application Server but I am having trouble finding the appropriate resource adapter for Tibco EMS. From my understanding, IBM MQ provides a resource adapter which can be configured in Liberty using the following code snippet:

<resourceAdapter id="mqJms" location="${server.config.dir}/wmq.jmsra.rar"> 
 <classloader apiTypeVisibility="spec, ibm-api, api, third-party"/>         
</resourceAdapter>

However, I am unsure if Tibco provides a similar resource adapter and if so, where I can find it. I have searched extensively but have not been able to find any relevant resources. I tried the couple of configuration suggested on different forms but none of them seems to be working.
I have been able to successfully connect to the EMS server using a Java application deployed in WebSphere using the JNDI lookup method, but I am having trouble configuring the Liberty server to use the same method. Can someone please guide me on how to configure JNDI for Tibco EMS in Liberty Application Server and if there is a resource adapter available for Tibco EMS?

Update -

I have tried with GenericAdapter with below configuration but getting error - javax.jms.JMSException: Could not create a session: javax.resource.spi.ResourceAllocationException.

    <library id="Tibco_Lib">
         <fileset dir="${server.config.dir}/lib/tibco" includes="*.jar"/>
        </library>
        
        <!-- Tibco EMS Resource Adapter (Generic) -->
        <resourceAdapter id="GenericRA"
                       location="${server.config.dir}/lib/tibco/generic-jms-ra- 
         2.0.1.Final.rar" autoStart="true">
                       <classloader commonLibraryRef="Tibco_Lib"/>
        </resourceAdapter>
        
        <connectionManager id="tibcoCM"></connectionManager>
     
        <connectionFactory connectionManagerRef="tibcoCM" jndiName="jms/QueueConnectionFactoryTemp">
            <properties.GenericRA 
   JndiParameters="java.naming.provider.url=tibjmsnaming://server:port;java.naming.factory.initial=com.tibco.tibjms.naming.TibjmsInitialContextFactory;java.naming.factory.url.pkgs=com.tibco.tibjms.naming;java.naming.security.principal=user;java.naming.security.credentials=password" 
            ConnectionFactory="QueueConnectionFactory" LogLevel="FINER" ProviderIntegrationMode="jndi" SupportsXA="false" UserName="user" Password="password"/>
        </connectionFactory>

  
1

There are 1 best solutions below

2
Alasdair On

As far as I can tell Tibco doesn't have a JMS Resource Adapter. I saw them announce one, but I've never found it. I have, however, managed to use a Generic JMS RA. There are two different ones, but the last one I tried was this one: https://github.com/jms-ra/generic-jms-ra