public abstract class JPAInitializer
extends java.lang.Object
JavaSECMPInitializer| Modifier and Type | Field and Description |
|---|---|
protected java.util.Map<java.lang.String,EntityManagerSetupImpl> |
initialEmSetupImpls |
protected java.lang.ClassLoader |
initializationClassloader |
protected static java.util.Map<java.lang.ClassLoader,JPAInitializer> |
initializers |
protected java.util.Map<java.lang.String,SEPersistenceUnitInfo> |
initialPuInfos |
protected boolean |
shouldCreateInternalLoader |
| Constructor and Description |
|---|
JPAInitializer() |
| Modifier and Type | Method and Description |
|---|---|
EntityManagerSetupImpl |
callPredeploy(SEPersistenceUnitInfo persistenceUnitInfo,
java.util.Map m,
java.lang.String persistenceUnitUniqueName,
java.lang.String sessionName)
predeploy (with deploy) is one of the two steps required in deployment of entities
This method will prepare to call predeploy, call it and finally register the
transformer returned to be used for weaving.
|
abstract void |
checkWeaving(java.util.Map properties)
Check whether weaving is possible and update the properties and variable as appropriate
|
protected abstract java.lang.ClassLoader |
createTempLoader(java.util.Collection col)
Create a temporary class loader that can be used to inspect classes and then
thrown away.
|
protected abstract java.lang.ClassLoader |
createTempLoader(java.util.Collection col,
boolean shouldOverrideLoadClassForCollectionMembers) |
java.lang.String |
createUniquePersistenceUnitName(PersistenceUnitInfo puInfo)
In case persistence unit is not uniquely defined by name
this method is called to generate a unique name.
|
EntityManagerSetupImpl |
extractInitialEmSetupImpl(java.lang.String puName) |
SEPersistenceUnitInfo |
findPersistenceUnitInfo(java.lang.String puName,
java.util.Map m)
Find PersistenceUnitInfo corresponding to the persistence unit name.
|
protected SEPersistenceUnitInfo |
findPersistenceUnitInfoInArchive(java.lang.String puName,
Archive archive,
java.util.Map m)
Find PersistenceUnitInfo corresponding to the persistence unit name in the archive.
|
protected SEPersistenceUnitInfo |
findPersistenceUnitInfoInArchives(java.lang.String puName,
java.util.Map m)
Find PersistenceUnitInfo corresponding to the persistence unit name.
|
java.lang.ClassLoader |
getInitializationClassLoader() |
void |
initialize(java.util.Map m)
This method initializes the container.
|
static void |
initializeTopLinkLoggingFile()
Initialize the logging file if it is specified by the system property.
|
protected void |
initPersistenceUnits(Archive archive,
java.util.Map m)
Initialize all persistence units found on initializationClassLoader.
|
boolean |
isPersistenceProviderSupported(java.lang.String providerClassName)
Returns whether the given persistence provider class is supported by this implementation
|
boolean |
isPersistenceUnitUniquelyDefinedByName()
Indicates whether puName uniquely defines the persistence unit.
|
protected boolean |
keepAllPredeployedPersistenceUnits()
Indicates whether initialPuInfos and initialEmSetupImpls are used.
|
protected java.util.Set |
loadEntityClasses(java.util.Collection entityNames,
java.lang.ClassLoader classLoader)
Create a list of java.lang.Class that contains the classes of all the entities
that we will be deploying.
|
abstract void |
registerTransformer(ClassTransformer transformer,
PersistenceUnitInfo persistenceUnitInfo,
java.util.Map properties)
Register a transformer.
|
protected boolean shouldCreateInternalLoader
protected java.lang.ClassLoader initializationClassloader
protected java.util.Map<java.lang.String,SEPersistenceUnitInfo> initialPuInfos
protected java.util.Map<java.lang.String,EntityManagerSetupImpl> initialEmSetupImpls
protected static java.util.Map<java.lang.ClassLoader,JPAInitializer> initializers
public static void initializeTopLinkLoggingFile()
public EntityManagerSetupImpl callPredeploy(SEPersistenceUnitInfo persistenceUnitInfo, java.util.Map m, java.lang.String persistenceUnitUniqueName, java.lang.String sessionName)
public abstract void checkWeaving(java.util.Map properties)
properties - The list of properties to check for weaving and update if weaving is not neededprotected abstract java.lang.ClassLoader createTempLoader(java.util.Collection col)
protected abstract java.lang.ClassLoader createTempLoader(java.util.Collection col,
boolean shouldOverrideLoadClassForCollectionMembers)
public SEPersistenceUnitInfo findPersistenceUnitInfo(java.lang.String puName, java.util.Map m)
protected SEPersistenceUnitInfo findPersistenceUnitInfoInArchives(java.lang.String puName, java.util.Map m)
protected SEPersistenceUnitInfo findPersistenceUnitInfoInArchive(java.lang.String puName, Archive archive, java.util.Map m)
public boolean isPersistenceProviderSupported(java.lang.String providerClassName)
providerClassName - protected java.util.Set loadEntityClasses(java.util.Collection entityNames,
java.lang.ClassLoader classLoader)
public abstract void registerTransformer(ClassTransformer transformer,
PersistenceUnitInfo persistenceUnitInfo,
java.util.Map properties)
transformer - persistenceUnitInfo - public boolean isPersistenceUnitUniquelyDefinedByName()
public java.lang.String createUniquePersistenceUnitName(PersistenceUnitInfo puInfo)
public EntityManagerSetupImpl extractInitialEmSetupImpl(java.lang.String puName)
public void initialize(java.util.Map m)
protected void initPersistenceUnits(Archive archive, java.util.Map m)
protected boolean keepAllPredeployedPersistenceUnits()
public java.lang.ClassLoader getInitializationClassLoader()