users@glassfish.java.net

Re: how to set properties for jms destination?

From: Nigel Deakin <nigel.deakin_at_oracle.com>
Date: Mon, 13 Dec 2010 18:45:56 +0000

Saikran,

On 13/12/2010 11:12, saikiranp wrote:
>
> Hi,
> I need to create a jms destination with some specific properties. like
> isLocalOnly etc.
>
> I can do that by creating the queue using imqcmd command. But i would
> like to know how i can create the same queue using asadmin create-jmsdest
> command with the above parameters.
>
> I tried to create the queue with two properties, one is "maxNumMsgs=1000"
> and the other one is "isLocalOnly=true" by using the following command.
>
> ./asadmin create-jmsdest --user admin --property
> maxNumMsgs=1000:isLocalOnly=true --target my-cluster --desttype queue
> MyTestQueue
>
> But i don't see any effect of these parameters on the queue. I could see
> that the messages are handled by all the instances in the traffic (which is
> the behavior when isLocalOnly=false) and max no of messages in the queue
> going beyond 1000. But if i create the queue with imqcmd command, everything
> works as per the expectations.
>
> Why is it not working with asadmin command?

I'm not sure. But it may be a spelling error.

> What properties i can set for destination using asadmin command?

You can set any destination property that is supported by the MQ JMX API (which asadmin uses internally).
These are listed here:
http://docs.sun.com/app/docs/doc/821-1797/6nmoodvug?l=en&a=view#gbabb
The list includes MaxNumMessages and LocalOnly. Note the spelling.

> Can i set isLocalOnly property using asadmin command?

I don't see why not. But I think you need to use the same spelling as above.

Then, run
imqcmd query dst -b <host>:<mqport> -t q -n <destname>
to see whether the destination has picked up the properties you specified.

Nigel

>
> Regards
> Saikiran
>
>