Skip to Content
avatar image
Former Member

Placing All Queues On Hold

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();
    }
  }
}
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Jul 18, 2017 at 12:21 PM

    Hello Raghunandan.

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

    Regards

    Uwe

    Add comment
    10|10000 characters needed characters exceeded