I wanted to discuss and figure out how to do remote messaging from standard MBeans within JBoss (no EJB's or MDB or anything). I am using JBoss 3.2.2RC4.
Suppose there are 2 machines running JBoss. 1 will act as server and other as client.
These are the ways I can think of for clients to publish messages to server
inside the code of clients:
Hashtable props = new Hashtable();
InitialContext iniCtx = new InitialContext(props);
Object tmp = iniCtx.lookup("XAConnectionFactory");
In Sun's J2EE tutorial, they talk about creation a ConnectionFactory that's mapped to a remote machine, so in the code of the client, they just look up ConnectionFactory locally and remoting is handled behind the scene. After searching these forums, I found something similar, but I can't seem to gather all the pieces of puzzle. This is what I think...
Update deploy/jms/jms-ds.xml with this information:
This is where the confusion starts. What do I need to do after this in config files and then how do I access it from code. For example,do I need to update standardjboss.xml with :
Any help will be much appreciated.
You only have part of the solution.
You also want to deploy a connection factory that
uses the remote provider, similar to JmsXA in jms-ds.xml
I'm pretty sure there is an example somewhere.
The key is to add <config-property name="JmsProviderJNDIName">RemoteMQProvider</config-property>
Check the jms rar for the exact name of the property.