Uploaded image for project: 'EJB 3.0'
  1. EJB 3.0
  2. EJBTHREE-1870

stopDelivery on active MDB results in exception (Session not found)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 1.1.3
    • ejb3
    • None

    Description

      If you start an MDB and introduce a messages to it then use the stopDelivery method of the MDB's MBean to stop it consuming messages you get an exception. Note this problem only occurs if the MDB has a transaction in flight when the stopDelivery is called.

      2009-05-20 12:30:52,499 ERROR [org.jboss.messaging.util.ExceptionUtil] (WorkManager(2)-44) Connectio
      nEndpoint[fe-oz919yuf-1-mj809yuf-bruz48-x21o4c5] sendTransaction [ur4-b6b39yuf-1-mj809yuf-bruz48-x21
      o4c5]
      javax.jms.IllegalStateException: Cannot find session with id ie-qz919yuf-1-mj809yuf-bruz48-x21o4c5
      at org.jboss.jms.server.endpoint.ServerConnectionEndpoint.processTransaction(ServerConnectionEndpoi
      nt.java:835)
      at org.jboss.jms.server.endpoint.ServerConnectionEndpoint.sendTransaction(ServerConnectionEndpoint.
      java:497)
      at org.jboss.jms.server.endpoint.advised.ConnectionAdvised.org$jboss$jms$server$endpoint$advised$Co
      nnectionAdvised$sendTransaction$aop(ConnectionAdvised.java:101)
      at org.jboss.jms.server.endpoint.advised.ConnectionAdvised$sendTransaction_N3268650789275322226.inv
      okeTarget(ConnectionAdvised$sendTransaction_N3268650789275322226.java)

      I have attached a slightly doctors version of the EJB3 MDB example code, it has been changed to introduce a sleep of 5 seconds in the MDB (to keep the transaction active longer) and also introduces a higher volume of messages to give you a chance to get to the JMX console and call stopDelivery. If you don't get an exception on the first attempt it is worth trying again as the transaction must be in flight for the problem to occur.

      Attachments

        Activity

          People

            Unassigned Unassigned
            philipdodds Philip Dodds (Inactive)
            Votes:
            3 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated: