docs: private void shutdownDerbyEmbedded() {
          DSConfig cfg = dsConfigRef.get();
          Hashtable<?, ?> vProps = cfg.vendorProps;
          String dbName = (String) vProps.get(DataSourceDef.databaseName.name());
          if (dbName == null) // Avoid causing null pointer when configuration is bad
              return;
  
          // Maintaining compatibility here. Variables are no longer normalized by default, but the ResourceFactoryBuilder is still
          // using VariableRegistry.resolveString() to resolve variables in data source definitions. 
          dbName = PathUtils.normalize(dbName);
          
          final boolean trace = TraceComponent.isAnyTracingEnabled();
          if (trace && tc.isEntryEnabled())
              Tr.entry(this, tc, "shutdownDerbyEmbedded", dbName, embDerbyRefCount);
  
          if (embDerbyRefCount.remove(dbName) && !embDerbyRefCount.contains(dbName))
              try {
                  ClassLoader jdbcDriverLoader = jdbcDriverSvc.getClassLoaderForLibraryRef();
                  if (jdbcDriverLoader != null) {
                      if (trace && tc.isDebugEnabled())
                          Tr.debug(this, tc, "using classloader", jdbcDriverLoader);
  
                      Class<?> EmbDS = AdapterUtil.forNameWithPriv("org.apache.derby.jdbc.EmbeddedDataSource40", true, jdbcDriverLoader);
                      DataSource ds = (DataSource) EmbDS.newInstance();
  
                      EmbDS.getMethod("setDatabaseName", String.class).invoke(ds, dbName);
                      EmbDS.getMethod("setShutdownDatabase", String.class).invoke(ds, "shutdown");
                      String user = (String) vProps.get(DataSourceDef.user.name());
                      if (user != null)
                          EmbDS.getMethod("setUser", String.class).invoke(ds, user);
                      String pwd = (String) vProps.get(DataSourceDef.password.name());
                      if (pwd != null)
                          EmbDS.getMethod("setPassword", String.class).invoke(ds, pwd);
  
                      ds.getConnection().close();
                  }
                  if (trace && tc.isEntryEnabled())
                      Tr.exit(this, tc, "shutdownDerbyEmbedded");
              } catch (SQLException x) {
                  // expected for shutdown
                  if (trace && tc.isEntryEnabled())
                      Tr.exit(this, tc, "shutdownDerbyEmbedded", x.getSQLState() + ' ' + x.getErrorCode() + ':' + x.getMessage());
              } catch (Throwable x) {
                  // Work around Derby issue when the JVM is shutting down while Derby shutdown is requested.
                  if (trace && tc.isEntryEnabled())
                      Tr.exit(this, tc, "shutdownDerbyEmbedded", x);
              }
          else if (trace && tc.isEntryEnabled())
              Tr.exit(this, tc, "shutdownDerbyEmbedded", false);
      }