docs: protected void canBeRemoved()
                      throws RemoveException
      {
          ContainerTx tx = container.getCurrentContainerTx();//d171654
  
          //-------------------------------------------------------------
          // If there is no current transaction then we are removing a
          // TX_BEAN_MANAGED session bean outside of a transaction which
          // is correct.
          //-------------------------------------------------------------
  
          if (tx == null)
          {
              return;
          }
  
          // Stateful beans cannot be removed in a global transaction,
          // unless this is an EJB 3.0 business method designated as a
          // removemethod                                                 d451675
  
          if (tx.isTransactionGlobal() &&
              tx.ivRemoveBeanO != this)
          {
              throw new RemoveException("Cannot remove session bean " +
                                        "within a transaction.");
          }
      }