Get url of a queue from javax.jms.Queue instance

529 views Asked by At

In my Java application I am connecting to a Tibco queue. The url of the Tibco queue is net.tems://server000002.test01.india.intranet:30002/queue/TEST_DOMAIN.001.TEST_QUEUE.001

In my java app, I have an instance of javax.jms.Queue which corresponds to this queue. If I use a method javax.jms.Queue.getQueueName(), I get this part: TEST_DOMAIN.001.TEST_QUEUE.001. I would like to know how can I get this part: net.tems://server000002.test01.india.intranet:30002/queue/ from the javax.jms.Queue instance.

Perhaps it is very easy, but I looked at the javadoc for javax.jms.Queue and I couldn't find anything that can help me.

2

There are 2 answers

0
raffian On BEST ANSWER

It sounds like you're trying to get proprietary information about a Tibco queue using the standard JMS API, and that won't work.

Tibco likely offers an extension of the JMS API for developers to perform Tibco-specific messaging features, and getting this information is probably one of them.

Browse the Tibco API documentation, specifically, the JMS extension API, you should find your answer there.

0
Jorge E. Hernández On

You can find some samples of how to use the TIBCO JAVA API in this path (in case of windows):

C:\tibco\ems[version]\samples\java

Hope this helps,