docs: public boolean removeStatefulBean(Object bean) throws RemoteException, RemoveException {
          final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
          if (isTraceOn && tc.isEntryEnabled())
              Tr.entry(tc, "removeStatefulBean : " + Util.identity(bean));
  
          // -----------------------------------------------------------------------
          // Determine whether the parameter is a normal wrapper (business or
          // component interface) or a No-Interface reference, and if No-Interface
          // then extract the normal wrapper from it.
          // -----------------------------------------------------------------------
  
          EJSWrapperBase wrapper = null;
          if (bean instanceof EJSWrapperBase) {
              wrapper = (EJSWrapperBase) bean;
          } else if (bean instanceof LocalBeanWrapper) {
              wrapper = EJSWrapperCommon.getLocalBeanWrapperBase((LocalBeanWrapper) bean);
          } else {
              if (isTraceOn && tc.isEntryEnabled())
                  Tr.exit(tc, "removeStatefulBean : RemoveException:" + Util.identity(bean));
              throw new RemoveException("Object to remove is not an enterprise bean reference : " + Util.identity(bean));
          }
  
          // -----------------------------------------------------------------------
          // Confirm that the bean is a stateful bean, per method contract.
          // -----------------------------------------------------------------------
  
          if (!isStatefulSessionBean(wrapper.beanId)) {
              if (isTraceOn && tc.isEntryEnabled())
                  Tr.exit(tc, "removeStatefulBean : RemoveException:not stateful : " + wrapper.beanId);
              throw new RemoveException("Object to remove is not a stateful bean reference : " + wrapper.beanId);
          }
  
          // -----------------------------------------------------------------------
          // Actually remove the bean, reporting true for success, false for does
          // not exist, and propagating other exceptions.
          //
          // Note that this must go through a 'normal' pre/post invoke cycle, to
          // activate the bean and insure it is in a proper state for removal.
          // This will perform normal lifecycle removal and update pmi statistics.
          // -----------------------------------------------------------------------
  
          try {
              removeBean(wrapper);
  
              if (isTraceOn && tc.isEntryEnabled())
                  Tr.exit(tc, "removeStatefulBean : true");
              return true;
          } catch (NoSuchEJBException ex) {
              if (isTraceOn && tc.isEntryEnabled())
                  Tr.exit(tc, "removeStatefulBean : false (NoSuchEJBException)");
              return false;
          } catch (NoSuchObjectLocalException ex) {
              if (isTraceOn && tc.isEntryEnabled())
                  Tr.exit(tc, "removeStatefulBean : false (NoSuchObjectLocalException)");
              return false;
          } catch (OBJECT_NOT_EXIST ex) {
              if (isTraceOn && tc.isEntryEnabled())
                  Tr.exit(tc, "removeStatefulBean : false (OBJECT_NOT_EXIST)");
              return false;
          } catch (EJBException ex) {
              // The RemoveException is considered 'checked' and should not be
              // wrapped in an EJBException.                                  d661827
              if (ex.getCause() instanceof RemoveException) {
                  RemoveException rex = (RemoveException) ex.getCause();
                  throw rex;
              }
              throw ex;
          }
      }