jboss-messaging-client.jar is not intended to be used in a managed environment. It is a convenience library to be used on the client side, when a remote client connects to a JBoss Messaging server.
If you access JBoss Messaging from an application running inside the JBoss application server, you need to deploy that application in the same class loading domain as the JBoss Messaging instance.
If you give me more details about what you are trying to do, I might be able to help you further.
We have jboss messaging running on one machine, and we have a web application that is sending messages running on another machine. The web application has jboss-messaging-client.jar in it's classpath so we can send messages to the jboss messaging server (which is on another machine completely).
If we try to expose mBeans from the webapp on the application server, the classes in jboss-messaging-client.jar interfere and we get errors.
I was wanting to know why jboss-messaging-client.jar contains the jmx server classes, what are they used for?
Here it goes:
Remoting has a dependency on JMX. It needs the JMX classes in its classpath (javax/management/MBeanRegistration, for example). To make Remoting happy, we're bundling the content of jboss-j2se.jar in the aggregated client jar. jboss-j2se.jar contains what Remoting needs, plus classes that are causing you trouble, unfortunately.
- expand jboss-messaging-client.jar
- remove org/jboss/mx subdirectory
- re-create the archive
- use the new jboss-messaging-client.jar in your classpath.
I will amend the release procedure to produce a "clean" client jar.
Thanks for your report.
Awesome, thanks very much for the quick response!