|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
JMS message to MQ from standalone Java class |
« View previous topic :: View next topic » |
Author |
Message
|
fjb_saper |
Posted: Thu Aug 14, 2008 1:51 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20763 Location: LI,NY
|
bower5932 wrote: |
rconn2 wrote: |
Do you really need the complexity of JNDI? |
If you go with the code that you have above, then your program becomes WMQ JMS specific. If you want to avoid this, get your definitions out of JNDI. |
Using JNDI allows your program to be completely detached from the implementation. If tomorrow you decided to connect to a different MQServer or provider your code would not need to change....The only thing that would change would be the content of the jndi .bindings file.
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
rconn2 |
Posted: Fri Aug 15, 2008 7:05 am Post subject: |
|
|
Voyager
Joined: 09 Aug 2007 Posts: 79 Location: MD, USA
|
I send command line args to java-jms apps specifying the host, port, qmanager, queue etc. The args themselves are script variables set in alternate script blocks chosen based upon a higher level variable.
The higher level variable is set in a script (setkeys.sh) which is used by the script that sets other script variables (setvars.sh). Since we're only using WMQ, the implementation is only dependent then on a small script (setkeys.sh).
Anyway, 6 of this, half-a-dozen of the other... scripting and command line args, or property files, or JNDI... |
|
Back to top |
|
 |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|