EJB 3.0
  1. EJB 3.0
  2. EJBTHREE-1870

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

    Details

    • Type: Bug Bug
    • Status: Open Open (View Workflow)
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.1.3
    • Fix Version/s: None
    • Component/s: ejb3
    • Labels:
      None
    • Environment:
      Mac OS/X Leopard, JDK 6, JBoss 5.1.0GA
    • Similar Issues:
      Show 10 results 

      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.

        Activity

        Hide
        Philip Dodds
        added a comment -

        This is the doctored EJB3 MDB code that I used to recreate the problem.

        Show
        Philip Dodds
        added a comment - This is the doctored EJB3 MDB code that I used to recreate the problem.
        Hide
        Garry Wright
        added a comment -

        Particularly interested in a fix for this as we use stopDelivery extensively in production to stop MDB consumption on other "instances" of the same MDB and or related components in the event of particular exceptions.

        Show
        Garry Wright
        added a comment - Particularly interested in a fix for this as we use stopDelivery extensively in production to stop MDB consumption on other "instances" of the same MDB and or related components in the event of particular exceptions.
        Hide
        Christian Strempfer
        added a comment -

        Is there some kind of workaround?

        Show
        Christian Strempfer
        added a comment - Is there some kind of workaround?

          People

          • Assignee:
            Unassigned
            Reporter:
            Philip Dodds
          • Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated: