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 » WebSphere Process Server (WID/WPS/WAS+) » Setting Queue custom property on WAS/WPS wsadmin jacl script

Post new topic  Reply to topic
 Setting Queue custom property on WAS/WPS wsadmin jacl script « View previous topic :: View next topic » 
Author Message
kevinobyrne
PostPosted: Sat Feb 19, 2011 12:52 am    Post subject: Setting Queue custom property on WAS/WPS wsadmin jacl script Reply with quote

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
View user's profile Send private message
kevinobyrne
PostPosted: Sat Feb 19, 2011 3:14 am    Post subject: Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Sat Feb 19, 2011 6:45 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

Have you considered that you might need to save before you change (alter)?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
kevinobyrne
PostPosted: Sun Feb 20, 2011 5:13 am    Post subject: Reply with quote

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
View user's profile Send private message
kevinobyrne
PostPosted: Fri Feb 25, 2011 5:31 am    Post subject: Reply with quote

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
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 » WebSphere Process Server (WID/WPS/WAS+) » Setting Queue custom property on WAS/WPS wsadmin jacl script
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.