|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Setting Queue custom property on WAS/WPS wsadmin jacl script |
« View previous topic :: View next topic » |
Author |
Message
|
kevinobyrne |
Posted: Sat Feb 19, 2011 12:52 am Post subject: Setting Queue custom property on WAS/WPS wsadmin jacl script |
|
|
 Voyager
Joined: 17 Jul 2007 Posts: 83 Location: Ireland
|
Hi All,
I have a jacl script which I'm running using wsadmin on Process Server v7.
The script creates queues for the jmsprovider.
The issue I'm having is that I need to set some custom properties on the queue (MDWRITE, MDREAD, MSGBODY) but when I do this in the script, the properties aren't set.
Code: |
set jmsProvider [$AdminConfig getid "/ServerCluster:tst-wps.AppTarget/JMSProvider:WebSphere MQ JMS Provider/"]
# MQ Configuration settings
set qMgr TESTQMGR
####
# Create MQ Queue Destinations
####
set baseQMgr [list baseQueueManagerName $qMgr]
set targetClient [list targetClient MQ]
set template [lindex [$AdminConfig listTemplates MQQueue] 0]
#
# Services queues
#
# REQUESTQ queue
set name [list name REQUESTQ ]
set jndi [list jndiName jms/REQUESTQ ]
set q [list baseQueueName REQUESTQ ]
set mqAttrs [list $name $jndi $q $baseQMgr $targetClient]
set thisQueue [$AdminConfig createUsingTemplate MQQueue $jmsProvider $mqAttrs $template]
$AdminTask modifyWMQQueue $thisQueue {-description "test description" -customProperties { {-name "MDWRITE"} { -value "YES"} } }
$AdminConfig save
|
The description "test description" is added to the queue, but the properties are not. Is my syntax right?
Thanks.[/code] |
|
Back to top |
|
 |
kevinobyrne |
Posted: Sat Feb 19, 2011 3:14 am Post subject: |
|
|
 Voyager
Joined: 17 Jul 2007 Posts: 83 Location: Ireland
|
I've tried using jython but am having the same issue:
Code: |
#test.py
import java
mqjmsp = AdminConfig.getid('/ServerCluster:tst-wps.AppTarget/JMSProvider:WebSphere MQ JMS Provider/')
AdminConfig.required('MQQueue')
qname = 'AQ4'
jmsqname = 'jms/' + qname
name = ['name', qname]
jndi = ['jndiName', jmsqname]
baseQN = ['baseQueueName', qname]
mqqAttrs = [name, jndi, baseQN]
lineseparator = java.lang.System.getProperty('line.separator')
template = AdminConfig.listTemplates('MQQueue').split(lineseparator)[0]
thisQueue = AdminConfig.createUsingTemplate('MQQueue', mqjmsp, mqqAttrs, template)
AdminTask.modifyWMQQueue(thisQueue, ["-description 'test description' -customProperties [[-name 'MDREAD'][-value 'YES']]"])
AdminConfig.save() |
|
|
Back to top |
|
 |
fjb_saper |
Posted: Sat Feb 19, 2011 6:45 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Have you considered that you might need to save before you change (alter)?  _________________ MQ & Broker admin |
|
Back to top |
|
 |
kevinobyrne |
Posted: Sun Feb 20, 2011 5:13 am Post subject: |
|
|
 Voyager
Joined: 17 Jul 2007 Posts: 83 Location: Ireland
|
I've tried that:
e.g. jacl
Code: |
...
set thisQueue [$AdminConfig createUsingTemplate MQQueue $jmsProvider $mqAttrs $template]
$AdminConfig save
$AdminTask modifyWMQQueue $thisQueue {-description "test description" -customProperties { {-name "MDWRITE"} { -value "YES"} } }
$AdminConfig save
|
But I had the same result. The thing is that the description is being written to the queue every time, but not the custom properties. |
|
Back to top |
|
 |
kevinobyrne |
Posted: Fri Feb 25, 2011 5:31 am Post subject: |
|
|
 Voyager
Joined: 17 Jul 2007 Posts: 83 Location: Ireland
|
Solution was to use createWMQQueue instead
Code: |
$AdminTask createWMQQueue $cell {-name q1 -jndiName q1 -queueName q1 -customProperties {{MDWRITE YES}}} |
|
|
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
|
|
|
|