code: public final synchronized void uninstall() {
          // To transition a Stateful bean to the "does not exist" state,
          // either ejbRemove or ejbPassivate must be called.
          // ejbPassivate has been chosen, as it will generally perform
          // better (it normally does less) assuming that the bean is not
          // actually passivated to a file.  Setting the "uninstalling"
          // flag to true avoids serializing to a file.
          // Calling ejbRemove is likely to cause a problem, as it is
          // typical for ejbRemove to call remove() on other beans...
          // which may already be disabled/uninstalled.
          // If the bean is not passivation capable, then just call
          // ejbRemove/PreDestroy rather than passivate.
          try {
              if (home.beanMetaData.isPassivationCapable()) {
                  uninstalling = true;
                  passivate();
              } else {
                  completeRemoveMethod(null);
              }
          } catch (RemoteException rex) {
              FFDCFilter.processException(rex, CLASS_NAME + ".uninstall", "654", this);
              Tr.warning(tc, "IGNORING_UNEXPECTED_EXCEPTION_CNTR0033E", rex);
          }
      }
docs: d112866