javax.persistence
Class Persistence.DefaultProviderResolver
java.lang.Object
javax.persistence.Persistence.DefaultProviderResolver
- All Implemented Interfaces:
- Persistence.ProviderResolver
- Enclosing class:
- Persistence
public static class Persistence.DefaultProviderResolver
- extends java.lang.Object
- implements Persistence.ProviderResolver
Default provider resolver class to use when none is explicitly set.
Uses the META-INF/services approach as described in the Java Persistence
specification. A getResources() call is made on the current context classloader
to find the service provider files on the classpath. Any service files found
are then read to obtain the classes that implement the persistence provider
interface.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PERSISTENCE_PROVIDER
public static final java.lang.String PERSISTENCE_PROVIDER
- See Also:
- Constant Field Values
SERVICE_PROVIDER_FILE
public static final java.lang.String SERVICE_PROVIDER_FILE
- See Also:
- Constant Field Values
Persistence.DefaultProviderResolver
public Persistence.DefaultProviderResolver()
findAllProviders
public java.util.Collection<PersistenceProvider> findAllProviders()
throws java.io.IOException
- Specified by:
findAllProviders
in interface Persistence.ProviderResolver
- Throws:
java.io.IOException