|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Setting WebSphere MQ Queue Connection Properties with Jython |
« View previous topic :: View next topic » |
Author |
Message
|
mschlenk |
Posted: Wed Apr 10, 2013 4:56 am Post subject: Setting WebSphere MQ Queue Connection Properties with Jython |
|
|
Newbie
Joined: 10 Apr 2013 Posts: 1
|
I'm using WAS 7 with MyEclipse 10. Would like to add to an existing Jython script the ability to set the WebSphere MQ Queue
Connection Properties (Queue manager host, Queue manager port, Server connection channel name). I've not been able to
find the jython commands to set these values. I'm not talking about the Queue Connection Factory. If you log into the
Admin console then choose: Resources, JMS, Queues. Click on one of the queues then under Additional Properties, select
WebSphere MQ Queue Connection Properties. On that screen under General Properties, you will see the fields for Queue
manager host, Queue manager port, Server connection channel name, User ID, Password.
Here is the command in my jython script to create the queue. I want to take it one step further and set the Connection
Properties associated with that queue.
AdminTask.createWMQQueue(serverConfigId, ["-name HM_TENV -jndiName JMS/HM_TENV -queueName HM_TENV6 -useRFH2 false -qmgr -description"])
I've searched the internet for the commands to set these values but have not been able to find them. I can find information related to the Connection Factory, which is not what I need.
Can anyone help, please. |
|
Back to top |
|
 |
tomtom |
Posted: Wed Apr 24, 2013 2:42 pm Post subject: jython question |
|
|
Newbie
Joined: 24 Apr 2013 Posts: 1
|
You were halfway there, you just need to use AdminConfig.modify() to set those attributes for the MQ queue connection properties that you can specify in Adminconsole. It's a bit cumbersome that you need a second command for this, but that's the way it is...
1) Get the config id of your newly created WMQ queue
like:
Code: |
qName = 'HM_TENV'
qID = AdminConfig.getid('/MQQueue:'+ qName + '/') |
2) Then use modify to set the 5 attributes:
Code: |
AdminConfig.modify(qID,
[
[ 'queueManagerHost', 'myhostname' ],
[ 'queueManagerPort', '1234'],
[ 'serverConnectionChannelName', 'channelName' ],
[ 'userName', 'wasadmin' ],
[ 'password', 'secret' ]
] )
|
Kind regards,
Thomas |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|