Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how does jms work with tibco?

I have a Java application which subscribes to a JMS topic application that occasionally thows the following exception :

javax.jms.JMSException: Connection has been terminated
at com.tibco.tibjms.Tibjmsx.buildException(Tibjmsx.java:470)
at com.tibco.tibjms.TibjmsConnection._onDisconnected(TibjmsConnection.java:1946)
at com.tibco.tibjms.TibjmsxLinkTcp$LinkReader.work(TibjmsxLinkTcp.java:314)
at com.tibco.tibjms.TibjmsxLinkTcp$LinkReader.run(TibjmsxLinkTcp.java:250)

I've been handed this piece of code after it's been untouched for 2 years. My JMS knowledge is very limited. It's maven-ized, but it has no reference to any tibco libraries whatsoever. I'm trying to understand how it's possible to get tibco exceptions when there's no reference of tibco in the codebase?

I do see however a system variable set called LD_LIBRARY_PATH which points to some tibco libraries.

Can someone experienced with JMS shell some light as to what might be happening here? Searching the codebase shows that there aint no tibco imports, only javax.jms.

Is it possible that they're somehow wrapped with LD_LIBRARY_PATH using jni or something?

like image 283
kkudi Avatar asked Apr 25 '13 16:04

kkudi


1 Answers

The JMS standard is an API standard. Applications written using the standard do not need to reference the classes from any particular JMS implementation. Instead JNDI is used to obtain a connection factory (example). The intention being that the JMS implementation used can be changed though configuration, rather than having to change code.

In regards to the LD_LIBRARY_PATH, EMS uses JNI and the LD_LIBRARY_PATH is needed, so the EMS jar used by your application can find the native library.

like image 71
Tom Howard Avatar answered Oct 02 '22 14:10

Tom Howard