Hi,
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
1.
----
inside the code of clients:
Hashtable props = new Hashtable();
....
("java.naming.provider.url", "jnp://servername:1099");
InitialContext iniCtx = new InitialContext(props);
Object tmp = iniCtx.lookup("XAConnectionFactory");
----
2.
-----
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...
Step 1:
Update deploy/jms/jms-ds.xml with this information:
RemoteJMSProvider
org.jboss.jms.jndi.JBossMQProvider
servermachine:1099
XAConnectionFactory
XAConnectionFactory
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 :
<destination-jndi-name>whatToPutHere!</destination-jndi-name>
-----
Any help will be much appreciated.