General JMS client

Does anyone know if it is possible to write a Common JMS client - i.e. Which works with JMS from different vendors (e.g. Sonic, IBM SIB, Jboss, etc.)?

Each time I wrote the code of the JMS client, it is always very specific to implement with the dependent JAR and Context classes.

Thank.

+5
source share
4 answers

Well, one of the best practices (at least for me) is to use the non-arg constructor InitialContextand to place specific provider things (like the initial factory context and provider URL) in a file jndi.propertieson the class path instead of hard-coding those things. You will also need to put the “correct” JMS JAR server in the class path. In other words, it may have common code, but you still need to tweak the runtime environment (unless you run your client code in a container like Spring).

+8
source

2 , . JMS API, . JMS , JAR . JMS, JMS.
(, TIBCO EMS -JNDI, ). JNDI-, JNDI factory .

+7

For those looking for a common client in the future, try HermesJMS , which comes with plugins for major JMS providers (ActiveMQ, WebSphere MQ, etc.)

+4
source

All Articles