I'm using Sun AppServer 9.1 and the default Sun Java System Message Queue 4.1
[b]Problem space:
I need to send JMS messages to 1..n number of remote servers.[/b]
Now, I can send a JMS message to a remote JMS server using the "org.omg.CORBA.ORBInitialHost" and "org.omg.CORBA.ORBInitialPort" properties set as either JVM arguments with -D or programatically with System.setProperty(...).
Unfortunately, neither of these solutions are viable for sending messages to 1..n possible recipients. Workflows will be fired off from JMS Messages on multiple queues, meaning there can be any number of concurrent workflows attempting to send messages to any given destination JMS server.
Obviously, JVM args wont cut it. Also, System.setProperty() won't work, since there could be hundreds of simeltaneous threads that all need to send to different servers (I assume that System.setProperty() is JVM-wide, so if one thread sets a ORB host/port, all other threads will now be using that setting).
I can only assume that is why there is a InitialContex(Hashtable env) constructor that takes properties to use when creating a javax.jmx.Context instance, but apparently the Sun impl of InitialContext wont use the CORBA Orb Host/Port settings set this way (or doesnt use any properties set this way? I don't know for sure).
Is there some other solution to this problem space using GlassFish/Sun Java System Message Queue 4.1?
[Message sent by forum member 'asherwin' (asherwin)]
http://forums.java.net/jive/thread.jspa?messageID=272823