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

Cluster node shutdown thats allow ongoing transactions to finish gracefully

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • None
    • Clustering
    • None
    • Medium

      Extend EJBTHREE-1116 so that in-flight transactions, specially those initiated remotely, are allowed to
      finish and no new transactions are allowed.

      EJBTHREE-1116 just blocks the shutdown until in-flight invocations complete, not until transactions
      complete. So a tx that's initiated on the client side that spans multiple invocations can see the node
      disappear in the middle. Our clustered EJB proxies don't allow failover in the middle of a transaction,
      so that means the client sees a failure.

      EJBTHREE-1116, consider the following session bean method:

      @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
      public void addUser(User user) {
      em.persist(user);
      }

      If the node is shutdown after a client has called addUser(), the transaction will indeed complete before
      the shutdown commences, but only as a side effect of waiting for the invocation to complete - the
      BlockContainerShutdownInterceptor sits in the front of the interceptor chain. Subsequent requests to
      addUser(...) (i.e. new transactions) will fail once shutdown is initiated.

      EJBTHREE-1116 doesn't cover transactions initiated from the client - nor invocations from one ejb to another
      (e.g. if addUser() tries to invoke a method on another ejb after shutdown is initiated).

            pferraro@redhat.com Paul Ferraro
            rh-ee-galder Galder ZamarreƱo
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated: