1 Reply Latest reply on Jun 24, 2005 9:45 AM by schrouf

    Sending Message causes InterruptedException

    prometeu

      Hi,

      I'm using JBoss 3.2.6. on linux with j2sdk1.4.2. It is configured in cluster with two machines.
      The EJB client connects to JMS Queue with Auto Acknowledge:

      queue = (Queue) context.lookup(queueName)
       connectionFactory = (QueueConnectionFactory) context.lookup(queueFactoryName);
       connection.setExceptionListener(this);
       session = connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
       sender = session.createSender(queue);
       connection.start();


      Our EJB, after a few hundreds messages, gets an JMSException caused by the InterruptedException. After that it continues without problem.
      The main problem arises because the EJB gets the JMSExcption but the message is correctly delivered.
      005-06-22 10:46:40,103 DEBUG [org.jboss.util.NestedThrowable] [11195188290166/PTSI20050622+0] org.jboss.util.NestedThrowable.parentTraceEnabled=true
      2005-06-22 10:46:40,115 DEBUG [org.jboss.util.NestedThrowable] [11195188290166/PTSI20050622+0] org.jboss.util.NestedThrowable.nestedTraceEnabled=false
      2005-06-22 10:46:40,115 DEBUG [org.jboss.util.NestedThrowable] [11195188290166/PTSI20050622+0] org.jboss.util.NestedThrowable.detectDuplicateNesting=true
      2005-06-22 10:46:40,115 ERROR [RequestPublisherBean] [11195188290166/PTSI20050622+0] Erro a publicar mensagem
      org.jboss.mq.SpyJMSException: Cannot send a message to the JMS server; - nested throwable: (java.lang.InterruptedException)
      at org.jboss.mq.Connection.sendToServer(Connection.java:1028)
      at org.jboss.mq.SpySession.sendMessage(SpySession.java:1005)
      at org.jboss.mq.SpyMessageProducer.send(SpyMessageProducer.java:265)
      at org.jboss.mq.SpyMessageProducer.send(SpyMessageProducer.java:199)
      ........
      Caused by: java.lang.InterruptedException
      at java.lang.Object.wait(Native Method)
      at java.lang.Object.wait(Object.java:429)
      at org.jboss.mq.il.uil2.SocketManager.internalSendMessage(SocketManager.java:243)
      at org.jboss.mq.il.uil2.SocketManager.sendMessage(SocketManager.java:197)
      at org.jboss.mq.il.uil2.UILServerIL.addMessage(UILServerIL.java:267)
      at org.jboss.mq.Connection.sendToServer(Connection.java:1020)
      2005-06-22 10:46:40,134 WARN [org.jboss.tm.TransactionImpl] [11195188290166/PTSI20050622+0] Lock contention, tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=seefdevbe02.ptsi.corppt.com//3, BranchQual=]


      What am I doing wrong, or is this a problem of JBoss?

      Thanks in advance,
      Renato

        • 1. Re: Sending Message causes InterruptedException
          schrouf

           

           | 2005-06-22 10:46:40,134 WARN [org.jboss.tm.TransactionImpl] [11195188290166/PTSI20050622+0] Lock contention, tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=seefdevbe02.ptsi.corppt.com//3, BranchQual=]
          


          This seems to be a server side locking problem. Maybe within a receiving MDB ?!?

          Regards
          Ulf