Pages

Wednesday, August 15, 2012

Integrating weblogic with Tibco

Many a times we face issues configuring Foreign JMS server in Weblogic which connects to other JMS providers like IBM MQ, Tibco, Sonic MQ, JBoss etc.

So let us see how we can configure one successfully with Tibco EMS.

I am using Windows 7 and installed Tibco at the default location " C:\tibco\ "

We would configure a Connection Factory and a Queue in Tibco while Foreign JMS server in Weblogic with basic configurations.

First of all we would have to start Tibco EMS server by excecuting the file " tibemsd.exe " found in " C:\tibco\ems\bin " directory.





Once the EMS server is started we need to start the Administration tool where we can configure queues , topics , users , groups etc.

Excecute the file " tibemsadmin.exe " found in " C:\tibco\ems\bin "  directory.




Now from the Administration tool we need to connect to the EMS server using the connect command.
By default the Login name is admin and password is nothing , so just hit enter.
Default port is 7222.




Now let us create a connection factory.
Syntax :
create factory      <name> <type> [<properties>]

Where,
type could be " generic, topic, queue, xageneric, xatopic or xaqueue "

Example :
create factory tibcoConnectionFactory queue url=tcp://localhost:7222



Let us create a Queue
Syntax :
create queue        <name> [<properties>]

Example :
create queue tibcoQueue


So we have created a Connection Factory and a Queue.

We can view the Connnection factory and Queue using the show command  as below :




These are the basic configuration that we have to configure at Tibco , Now let us configure resources on weblogic.

On the weblogic side we need to configure a Foreign JMS server :



Once we have create ForeignJMS server, we need to modify two things,
1. JNDI Initial Context Factory
2. JNDI Connection URL

Modify the JNDI Initial Context Factory to " com.tibco.tibjms.naming.TibjmsInitialContextFactory "
While change the JNDI Connection URL to tcp://<ip-address of tibco>:<port of tibco>





We need to map the local destination JNDI in weblogic with the remote destination JNDI in tibco.
So create a destination and provide a local jndi name , this is not the physical destination , it is just used for mapping. While for the remote JNDI name provide the correct queue jndi name as we created in tibco.




Similar to the destination , we need to configure local and remote connection factories.



We are done with our configurations , now let us send some messages and check if we are able to receive it.

To do so let us use the sample java QueueSend and QueueReceive programs provided by Weblogic.

Modify the QueueSend program to send message to the Tibco Queue(tibcoQueue) and modify the QueueReceive program to receive it from the weblogic Queue(weblogicQueue) .




- Prashant Gaikwad.



1 comment:

  1. Do tibco jars need to be in the weblogic classpath for this to work?

    ReplyDelete