Log version information about the specified persistence provider, if it can be determined.

@param providerName fully qualified class name of JPA persistence provider
@param loader class loader with access to the JPA provider classes
355309
@FFDCIgnore(Exception.class)
    private void logProviderInfo(String providerName, ClassLoader loader) {
        try {
            if (PROVIDER_ECLIPSELINK.equals(providerName)) {
                // org.eclipse.persistence.Version.getVersion(): 2.6.4.v20160829-44060b6
                Class<?> Version = loadClass(loader, "org.eclipse.persistence.Version");
                String version = (String) Version.getMethod("getVersionString").invoke(Version.newInstance());
                Tr.info(tc, "JPA_THIRD_PARTY_PROV_INFO_CWWJP0053I", "EclipseLink", version);
            } else if (PROVIDER_HIBERNATE.equals(providerName)) {
                // org.hibernate.Version.getVersionString(): 5.2.6.Final
                Class<?> Version = loadClass(loader, "org.hibernate.Version");
                String version = (String) Version.getMethod("getVersionString").invoke(null);
                Tr.info(tc, "JPA_THIRD_PARTY_PROV_INFO_CWWJP0053I", "Hibernate", version);
            } else if (PROVIDER_OPENJPA.equals(providerName)) {
                // OpenJPAVersion.appendOpenJPABanner(sb): OpenJPA #.#.#\n version id: openjpa-#.#.#-r# \n Apache svn revision: #
                StringBuilder version = new StringBuilder();
                Class<?> OpenJPAVersion = loadClass(loader, "org.apache.openjpa.conf.OpenJPAVersion");
                OpenJPAVersion.getMethod("appendOpenJPABanner", StringBuilder.class).invoke(OpenJPAVersion.newInstance(), version);
                Tr.info(tc, "JPA_THIRD_PARTY_PROV_INFO_CWWJP0053I", "OpenJPA", version);
            } else {
                Tr.info(tc, "JPA_THIRD_PARTY_PROV_NAME_CWWJP0052I", providerName);
            }
        } catch (Exception x) {
            Tr.info(tc, "JPA_THIRD_PARTY_PROV_NAME_CWWJP0052I", providerName);
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                Tr.debug(this, tc, "unable to determine provider info", x);
        }
    }
359091
@Reference(policy = DYNAMIC, policyOption = GREEDY, cardinality = MANDATORY)
    protected void setProvider(MetricRecorderProvider provider) {
        metricProvider = provider;
    }
823741
private void updatedCache(final ClassLoader classLoader, final Set<TraceeBackendProvider> provider) {
		final Map<ClassLoader, Set<TraceeBackendProvider>> copyOnWriteMap = new WeakHashMap<>(providersPerClassloader);
		if (!provider.isEmpty()) {
			copyOnWriteMap.put(classLoader, new BackendProviderSet(provider));
		} else {
			copyOnWriteMap.put(classLoader, new EmptyBackendProviderSet());
		}
		providersPerClassloader = copyOnWriteMap;
	}
1106791
public boolean recordVersion(String version) {
    if (currentInfo.documentVersion(version)) {
      populated = true;
      return true;
    } else {
      return false;
    }
  }
412117
@Override
  public void register(final String name, final boolean isDefault, final LoggerProvider loggerProvider) {
    final boolean actualDefault = loggerProviderKeeper.findDefault() == null ? true : isDefault;
    loggerProviderKeeper.keep(name, actualDefault, loggerProvider);
    this.defaultLogger = loggerProviderKeeper.findDefault().logger();
  }
655248
public static StorageBuilder forProvider( String providerName )
    {
        Class<?> providerClass = PROVIDERS.get( providerName );

        if ( providerClass == null ) {
            throw new IllegalArgumentException( "No provider implementation registered for name: " + providerName );
        }

        return new StorageBuilder( providerName, providerClass );
    }
890887
public void checkVersion(String version) throws ConnectionException {
        MetaModel meta = createMetaModel();
        meta.getAssetType("Member");

        if ((version != null) && (version.length() > 0)
                && ((meta.getVersion() == null) || (meta.getVersion()
                .compareTo(new Version(version)) < 0))) {
            throw new ConnectionException(MessageFormat.format(
                    "VersionOne Release {0} or above is required (found {1}).",
                    version, meta.getVersion()));
        }
    }
1135043
protected void setDataProvider(DataProvider provider) {
		if ((this.dataProvider != null)
				&& (this.dataProvider.getRefreshPolicy() == DataProvider.RefreshPolicy.ON_USER_SWITCH)) {
			getApplicationConfig()
					.applicationSession()
					.removePropertyChangeListener(ApplicationSession.USER, this);
		}

		this.dataProvider = provider;

		if ((this.dataProvider != null)
				&& (this.dataProvider.getRefreshPolicy() == DataProvider.RefreshPolicy.ON_USER_SWITCH)) {
			getApplicationConfig().applicationSession().addPropertyChangeListener(
					ApplicationSession.USER, this);
		}
	}
414847
@Override
	public Object getCurrentVersion(Serializable id, SharedSessionContractImplementor session) throws HibernateException {

		if ( log.isTraceEnabled() ) {
			log.trace( "Getting version: " + MessageHelper.infoString( this, id, getFactory() ) );
		}
		final Tuple resultset = getFreshTuple( EntityKeyBuilder.fromPersister( this, id, session ), session );

		if ( resultset == null ) {
			return null;
		}
		else {
			return gridVersionType.nullSafeGet( resultset, getVersionColumnName(), session, null );
		}
	}
1121949
public static void displayVersion(final PrintWriter writer) {
        for (String line : new VersionProvider().getVersion()) {
            writer.println(line);
        }
    }
1374467
public void load(ClassLoader classLoader) {
        Map<String, GroovyRunner> map = runnerMap; // direct read
        if (map == null) {
            map = getMap(); // initialize and load (recursive call), result ignored
            if (classLoader == null) {
                // getMap() already loaded using a null classloader
                return;
            }
        }
        writeLock.lock();
        try {
            if (classLoader == null) {
                classLoader = Thread.currentThread().getContextClassLoader();
            }
            cachedValues = null;
            loadDefaultRunners();
            loadWithLock(classLoader);
        } catch (SecurityException se) {
            LOG.log(Level.WARNING, "Failed to get the context ClassLoader", se);
        } catch (ServiceConfigurationError sce) {
            LOG.log(Level.WARNING, "Failed to load GroovyRunner services from ClassLoader " + classLoader, sce);
        } finally {
            writeLock.unlock();
        }
    }
251721
public static void clearClassLoader(final ClassLoader classLoader) {
        BeanPropertiesCache.clear(classLoader);
        final Iterator<Map.Entry<CacheKey, String>> it = CLASS_CACHE.entrySet().iterator();
        while (it.hasNext()) {
            final CacheKey key = it.next().getKey();
            if (key.loader == classLoader) {
                it.remove();
            }
        }
    }
327990
private void instanceAlreadyLoaded(
		final Tuple resultset,
		final int i,
			//TODO create an interface for this usage
		final OgmEntityPersister persister,
		final org.hibernate.engine.spi.EntityKey key,
		final Object object,
		final LockMode lockMode,
		final SharedSessionContractImplementor session)
	throws HibernateException {
		if ( !persister.isInstance( object ) ) {
			throw new WrongClassException(
					"loaded object was of wrong class " + object.getClass(),
					key.getIdentifier(),
					persister.getEntityName()
				);
		}

		if ( LockMode.NONE != lockMode && upgradeLocks() ) { // no point doing this if NONE was requested

			final boolean isVersionCheckNeeded = persister.isVersioned() &&
					session.getPersistenceContext().getEntry( object )
							.getLockMode().lessThan( lockMode );
			// we don't need to worry about existing version being uninitialized
			// because this block isn't called by a re-entrant load (re-entrant
			// loads _always_ have lock mode NONE)
			if ( isVersionCheckNeeded ) {
				//we only check the version when _upgrading_ lock modes
				Object oldVersion = session.getPersistenceContext().getEntry( object ).getVersion();
				persister.checkVersionAndRaiseSOSE( key.getIdentifier(), oldVersion, session, resultset );
				//we need to upgrade the lock mode to the mode requested
				session.getPersistenceContext().getEntry( object )
						.setLockMode( lockMode );
			}
		}
	}
183795
public final void initApplicationClassLoader(ClassLoader loader)
    {
        if (loader == null)
            throw new IllegalArgumentException("loader is null");
        if (!Kit.testIfCanLoadRhinoClasses(loader))
            throw new IllegalArgumentException(
                "Loader can not resolve Rhino classes");

        if (this.applicationClassLoader != null)
            throw new IllegalStateException(
                "applicationClassLoader can only be set once");
        checkNotSealed();

        this.applicationClassLoader = loader;
    }
617060
protected static void loadProvider(final URL url, final ClassLoader cl) {
        try {
            final Properties props = PropertiesUtil.loadClose(url.openStream(), url);
            if (validVersion(props.getProperty(API_VERSION))) {
                final Provider provider = new Provider(props, url, cl);
                PROVIDERS.add(provider);
                LOGGER.debug("Loaded Provider {}", provider);
            }
        } catch (final IOException e) {
            LOGGER.error("Unable to open {}", url, e);
        }
    }
966643
public synchronized void registerEntityClasses(final String iPackageName, final ClassLoader iClassLoader) {
		OLogManager.instance().debug(this, "Discovering entity classes inside package: %s", iPackageName);

		List<Class<?>> classes = null;
		try {
			classes = OReflectionHelper.getClassesForPackage(iPackageName, iClassLoader);
		} catch (ClassNotFoundException e) {
			throw new OException(e);
		}
		for (Class<?> c : classes) {
			if (!classHandler.containsEntityClass(c)) {
				if (c.isAnonymousClass()) {
					OLogManager.instance().warn(this, "Trying to register an anonymous class '%s'.", c.getName());
					continue;
				}
				classHandler.registerEntityClass(c);
			}
		}

		if (OLogManager.instance().isDebugEnabled()) {
			for (Entry<String, Class<?>> entry : classHandler.getClassesEntrySet()) {
				OLogManager.instance().debug(this, "Loaded entity class '%s' from: %s", entry.getKey(), entry.getValue());
			}
		}
	}
924325
@Override
    public String getClassLoaderIdentifier(ClassLoader classloader) throws IllegalArgumentException {
        // Disable for bundles, because the bundle id can change across instances of the server,
        // meaning the identifier would not be reliable
        if (classloader instanceof ThreadContextClassLoader && !(classloader instanceof ThreadContextClassLoaderForBundles)) {
            return ((ThreadContextClassLoader) classloader).getKey();
        } else {
            return null;
        }
    }