code: @Override
      public synchronized void postInvoke(int id, EJSDeployedSupport s) //LIDB2018-1
                      throws RemoteException {
          currentIsolationLevel = s.oldIsolationLevel;
  
          if (removed) {
              return;
          }
  
          switch (state) {
  
              case IN_METHOD:
                  setState(METHOD_READY);
                  break;
  
              case TX_IN_METHOD:
                  setState(TX_METHOD_READY);
                  break;
  
              case DESTROYED:
                  return;
  
              default:
                  throw new InvalidBeanOStateException(StateStrs[state], "IN_METHOD | TX_IN_METHOD " +
                                                                         "| DESTROYED");
          }
  
          // If the current method exiting is a Remove method (@Remove) on a
          // business interface and there was no exception, or an app exception
          // and retain was not specified, then set the bean in the current tx
          // for removal after the transaction completes.                     390657
          if (s.methodInfo.ivSFSBRemove &&
              (s.ivWrapper.ivInterface == BUSINESS_LOCAL ||
               s.ivWrapper.ivInterface == BUSINESS_REMOTE ||
               s.ivWrapper.ivInterface == BUSINESS_RMI_REMOTE)
              &&
              (s.getExceptionType() == ExceptionType.NO_EXCEPTION ||
               (!s.methodInfo.ivRetainIfException &&
                s.getExceptionType() == ExceptionType.CHECKED_EXCEPTION))) {
              s.currentTx.ivRemoveBeanO = this;
          }
      }
docs: Inform this <code>SessionBeanO</code> that a method
  invocation has completed on its associated enterprise bean. <p>
  
  @param id an <code>int</code> indicating which method is being
  invoked on this <code>BeanO</code> <p>
  
  @param s the <code>EJSDeployedSupport</code> instance passed to
  both pre and postInvoke <p>