docs: final void close() {
          final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
          if (isTraceOn && tc.isEntryEnabled())
              Tr.entry(tc, "close : " + ivArchivePuId, this);
  
          // First, prevent any further EntityManager factories from being
          // created. EMFs may be created for each java:comp/env context.
          if (ivEMFMap != null) {
              synchronized (ivEMFMap) {
                  ivCreateEMFAllowed = false;
              }
          }
  
          // Next, shutdown any EntityManager pools that exist.  This will close
          // all of the pooled EMs and prevent the pools from adding any more EMs.
          // This does NOT close any EMs that customers may be actively using...
          // and it is also possible a new pool may be created prior to closing
          // the EMFs below, but the EMF close is gauranteed to close all EMs
          // associated with it.                                             d510184
          synchronized (ivEMPoolMap) {
              if (isTraceOn && tc.isDebugEnabled())
                  Tr.debug(tc, "shutting down EM pools : " + ivEMPoolMap.size());
  
              for (JPAEMPool emPool : ivEMPoolMap.values()) {
                  emPool.shutdown();
              }
          }
  
          unregisterClassFileTransformer(ivClassLoader);
  
          // Finally, close the base EMF, and any EMFs that have been created
          // for each java:comp/env.
          if (ivEMFactory != null) {
              // d455363 Begins
              if (ivEMFactory.isOpen()) {
                  try {
                      if (isTraceOn && tc.isDebugEnabled())
                          Tr.debug(tc, "closing base EMF");
                      ivEMFactory.close();
                  } catch (Exception e) {
                      FFDCFilter.processException(e, CLASS_NAME + ".close",
                                                  "934", this);
  
                      if (isTraceOn && tc.isDebugEnabled())
                          Tr.debug(tc, "Caught unexpected exception on factory.close():" + e);
                  }
              }
              // d455363 Ends
  
              // Close all of the factories for each J2EEName when the datasource
              // is defined in java:comp/env.                                 d510184
              if (ivEMFMap != null) {
                  for (EntityManagerFactory emFactory : ivEMFMap.values()) {
                      if (emFactory.isOpen()) {
                          try {
                              if (isTraceOn && tc.isDebugEnabled())
                                  Tr.debug(tc, "closing component EMF");
                              emFactory.close();
                          } catch (Exception e) {
                              FFDCFilter.processException(e, CLASS_NAME + ".close",
                                                          "934", this);
  
                              if (isTraceOn && tc.isDebugEnabled())
                                  Tr.debug(tc, "Caught unexpected exception on factory.close():" + e);
                          }
                      }
                  }
              }
          }
  
          if (isTraceOn && tc.isEntryEnabled())
              Tr.exit(tc, "close : " + ivArchivePuId);
      }