Skip to Content
0

Placing All Queues On Hold

May 18, 2017 at 03:15 PM

82

avatar image
Former Member

Hello All

The redwood script as per documentation to place all the queues on hold except system queue is not working when i tried. The reason is we have another queue called System_BursterQueue which the below script tries to hold. Due to immutable properties, the script to hold the queues fails.

How do i make the below script to ignore all system queues and hold rest others

Please help

Thank you

{

  for (Iterator it = jcsSession.executeObjectQuery("select Queue.* from Queue where Name <> 'System'",null); it.hasNext();)
  {
    Queue queue = (Queue) it.next();
    if(queue.isOpen())
    {
      jcsOut.println("Holding queue " + queue.getName() + ", which has the status " + queue.getStatus() + ".");
      queue.hold();
      jcsSession.persist();
    }
  }
}
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Uwe Johannsen Jul 18, 2017 at 12:21 PM
0

Hello Raghunandan.

You just change the term <> 'System' to not like 'System%' ,and all queues starting with 'System' are selected.

Regards

Uwe

Share
10 |10000 characters needed characters left characters exceeded