5 Replies Latest reply on Nov 23, 2005 11:46 AM by Schacher

    timeout when invoking stopDelivery

    Schacher Newbie

      hi folks,
      i try to stop message-delivery of a queue in case of error.

      public class DocImportProcessorBean implements javax.ejb.MessageDrivenBean, javax.jms.MessageListener {
      ...
      
      public void onMessage(Message message) {
       try {
       ...
       } catch (Exception ex) {
       System.err.println("trace 1");
       MBeanServer server = MBeanServerLocator.locateJBoss();
       System.err.println("trace 2");
       server.invoke(new ObjectName(objectNameDocImportQueue), "stopDelivery", new Object[] {}, null);
       System.err.println("trace 3");
       sc.setRollbackOnly();
       System.err.println("trace 4");
       }
      }
      }
      


      result:
      messagedelivery is stopped, but i don't get back the control after the statement "server.invoke..." (bug or feature?)
      console:
      trace 1
      trace 2
      


      serverlog:
      2005-11-17 22:43:40,531 DEBUG [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Stop requested
      2005-11-17 22:43:40,531 DEBUG [org.jboss.ejb.plugins.jms.JMSContainerInvoker] innerStop
      2005-11-17 22:43:40,531 DEBUG [org.jboss.ejb.plugins.jms.JMSContainerInvoker] unset exception listener
      2005-11-17 22:43:40,531 DEBUG [org.jboss.ejb.plugins.jms.JMSContainerInvoker] connection stopped
      2005-11-17 22:43:40,531 DEBUG [org.jboss.ejb.plugins.jms.DLQHandler] Stopping DLQHandler
      2005-11-17 22:43:40,531 DEBUG [org.jboss.ejb.plugins.jms.DLQHandler] Stopped DLQHandler
      



      after 5 minutes, i get a timeout:
       [exec] 22:48:40,187 WARN [TransactionImpl] Transaction TransactionImpl:XidImpl[FormatId=257, GlobalId=evian/26, BranchQual=, localId=26] timed out. status=STATUS_MARKED_ROLLBACK
      


      start/stop messagedelivery in this 5 minutes by using the jmx-console works fine.

      do i have to follow a rule when i stop messagedelivery?

      thank you for response!!
      marc


      (i'm using jboss-4.0.3sp1)