ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » Setting WebSphere MQ Queue Connection Properties with Jython

Post new topic  Reply to topic
 Setting WebSphere MQ Queue Connection Properties with Jython « View previous topic :: View next topic » 
Author Message
mschlenk
PostPosted: Wed Apr 10, 2013 4:56 am    Post subject: Setting WebSphere MQ Queue Connection Properties with Jython Reply with quote

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
View user's profile Send private message
tomtom
PostPosted: Wed Apr 24, 2013 2:42 pm    Post subject: jython question Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Setting WebSphere MQ Queue Connection Properties with Jython
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.