org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider
| Modifier and Type | Class and Description |
|---|---|
| public static class | JavaSECMPInitializer.TempEntityLoader
This class loader is provided at initialization time to allow us to temporarily load domain classes so we can examine them for annotations. |
| Modifier and Type | Field and Description |
|---|---|
| public static Instrumentation | |
| private static final Object | |
| protected static JavaSECMPInitializer | |
| protected static boolean | |
| protected static boolean | |
| protected static boolean |
| Access | Constructor and Description |
|---|---|
| protected | |
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public void | checkWeaving(Map<K, V>
The list of properties to check for weaving and update if weaving is not needed properties)Implements abstract org. |
| protected ClassLoader | createTempLoader(Collection<E> col)
Implements abstract org. |
| protected ClassLoader | createTempLoader(Collection<E> col, boolean shouldOverrideLoadClassForCollectionMembers)
Implements abstract org. |
| public static JavaSECMPInitializer | |
| public static JavaSECMPInitializer | |
| public static JavaSECMPInitializer | |
| public static JavaSECMPInitializer | |
| public static JavaSECMPInitializer | |
| protected static void | |
| public static void | initializeFromMain(Map<K, V>
- a map containing the set of properties to instantiate with. m)Usually JavaSECMPInitializer is initialized from agent during premain to ensure that the classes to be weaved haven't been loaded before initialization. |
| public static void | |
| public static boolean | |
| public static boolean | |
| public boolean | isPersistenceUnitUniquelyDefinedByName()
Indicates whether puName uniquely defines the persistence unit.
|
| protected boolean | keepAllPredeployedPersistenceUnits()
Overrides org. |
| public void | registerTransformer(final ClassTransformer transformer, PersistenceUnitInfo persistenceUnitInfo, Map<K, V> properties)
Implements abstract org. |
| public static void | |
| public static boolean |
| globalInstrumentation | back to summary |
|---|---|
| public static Instrumentation globalInstrumentation | |
| initializationLock | back to summary |
|---|---|
| private static final Object initializationLock | |
| initializer | back to summary |
|---|---|
| protected static JavaSECMPInitializer initializer | |
| isInContainer | back to summary |
|---|---|
| protected static boolean isInContainer | |
| isInitialized | back to summary |
|---|---|
| protected static boolean isInitialized | |
| usesAgent | back to summary |
|---|---|
| protected static boolean usesAgent | |
| JavaSECMPInitializer | back to summary |
|---|---|
| protected JavaSECMPInitializer() User should not instantiate JavaSECMPInitializer. | |
| JavaSECMPInitializer | back to summary |
|---|---|
| protected JavaSECMPInitializer(ClassLoader loader) | |
| checkWeaving | back to summary |
|---|---|
| public void checkWeaving(Map<K, V> properties) Implements abstract org. Check whether weaving is possible and update the properties and variable as appropriate | |
| createTempLoader | back to summary |
|---|---|
| protected ClassLoader createTempLoader(Collection<E> col) Implements abstract org. Create a temporary class loader that can be used to inspect classes and then thrown away. This allows classes to be introspected prior to loading them with application's main class loader enabling weaving.
| |
| createTempLoader | back to summary |
|---|---|
| protected ClassLoader createTempLoader(Collection<E> col, boolean shouldOverrideLoadClassForCollectionMembers) Implements abstract org.
| |
| getJavaSECMPInitializer | back to summary |
|---|---|
| public static JavaSECMPInitializer getJavaSECMPInitializer() Get the singleton entityContainer. | |
| getJavaSECMPInitializer | back to summary |
|---|---|
| public static JavaSECMPInitializer getJavaSECMPInitializer(ClassLoader classLoader) | |
| getJavaSECMPInitializer | back to summary |
|---|---|
| public static JavaSECMPInitializer getJavaSECMPInitializer(ClassLoader classLoader, Map<K, V> m, boolean fromAgent) | |
| getJavaSECMPInitializerFromAgent | back to summary |
|---|---|
| public static JavaSECMPInitializer getJavaSECMPInitializerFromAgent() | |
| getJavaSECMPInitializerFromMain | back to summary |
|---|---|
| public static JavaSECMPInitializer getJavaSECMPInitializerFromMain(Map<K, V> m) | |
| initializeFromAgent | back to summary |
|---|---|
| protected static void initializeFromAgent(Instrumentation instrumentation) throws Exception INTERNAL: Should be called only by the agent. (when weaving classes) If succeeded return true, false otherwise. | |
| initializeFromMain | back to summary |
|---|---|
| public static void initializeFromMain(Map<K, V> m) Usually JavaSECMPInitializer is initialized from agent during premain to ensure that the classes to be weaved haven't been loaded before initialization. However, in this case initialization can't be debugged. In order to be able to debug initialization specify in java options -javaagent with parameter "main": (note: a separate eclipselink-agent.jar is no longer required) -javaagent:c:\trunk\eclipselink.jar=main that causes instrumentation to be cached during premain and postpones initialization until main. With initialization done in main (during the first createEntityManagerFactory call) there's a danger of the classes to be weaved being already loaded. In that situation initializeFromMain should be called before any classes are loaded. The sure-to-work method would be to create a new runnable class with a main method consisting of just two lines: calling initializeFromMain followed by reflective call to the main method of the original runnable class. The same could be achieved by calling PersistenceProvider.createEntityManagerFactory method instead of JavaSECMPInitializer.initializeFromMain method, however initializeFromMain might be more convenient because it doesn't require a persistence unit name. The method doesn't do anything if JavaSECMPInitializer has been already initialized.
| |
| initializeFromMain | back to summary |
|---|---|
| public static void initializeFromMain() The version of initializeFromMain that passes an empty map. | |
| isInContainer | back to summary |
|---|---|
| public static boolean isInContainer() | |
| isInitialized | back to summary |
|---|---|
| public static boolean isInitialized() Indicates whether initialization has already occurred. | |
| isPersistenceUnitUniquelyDefinedByName | back to summary |
|---|---|
| public boolean isPersistenceUnitUniquelyDefinedByName() Indicates whether puName uniquely defines the persistence unit. usesAgent means that it is a stand alone SE case. Otherwise it could be an application server case where different persistence units may have the same name: that could happen if they are loaded by different classloaders; the common case is the same persistence unit jar deployed in several applications.
| |
| keepAllPredeployedPersistenceUnits | back to summary |
|---|---|
| protected boolean keepAllPredeployedPersistenceUnits() Overrides org. Indicates whether initialPuInfos and initialEmSetupImpls are used.
| |
| registerTransformer | back to summary |
|---|---|
| public void registerTransformer(final ClassTransformer transformer, PersistenceUnitInfo persistenceUnitInfo, Map<K, V> properties) Implements abstract org. Register a transformer. In this case, we use the instrumentation to add a transformer for the JavaSE environment
| |
| setIsInContainer | back to summary |
|---|---|
| public static void setIsInContainer(boolean isInContainer) | |
| usesAgent | back to summary |
|---|---|
| public static boolean usesAgent() Indicates whether Java agent and globalInstrumentation was used. | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv Collection | |
| pack-priv boolean |
| Access | Constructor and Description |
|---|---|
| public | TempEntityLoader(URL[] urls, ClassLoader parent, Collection<E> classNames, boolean shouldOverrideLoadClassForCollectionMembers)
|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Enumeration | getResources(String
The resource name name)Overrides java. |
| protected synchronized Class | loadClass(String
The binary name of the class name, boolean If resolve)true then resolve the classOverrides java. |
| protected boolean |
| classNames | back to summary |
|---|---|
| pack-priv Collection<E> classNames | |
| shouldOverrideLoadClassForCollectionMembers | back to summary |
|---|---|
| pack-priv boolean shouldOverrideLoadClassForCollectionMembers | |
| TempEntityLoader | back to summary |
|---|---|
| public TempEntityLoader(URL[] urls, ClassLoader parent, Collection<E> classNames, boolean shouldOverrideLoadClassForCollectionMembers) | |
| TempEntityLoader | back to summary |
|---|---|
| public TempEntityLoader(URL[] urls, ClassLoader parent, Collection<E> classNames) | |
| getResources | back to summary |
|---|---|
| public Enumeration Overrides java. Doc from java. Finds all the resources with the given name. A resource is some data (images, audio, text, etc) that can be accessed by class code in a way that is independent of the location of the code. The name of a resource is a Resources in named modules are subject to the encapsulation rules
specified by
| |
| loadClass | back to summary |
|---|---|
| protected synchronized Class Overrides java. Doc from java. Loads the class with the specified binary name. The default implementation of this method searches for classes in the following order:
If the class was found using the above steps, and the
Subclasses of Unless overridden, this method synchronizes on the result of
| |
| shouldOverrideLoadClass | back to summary |
|---|---|
| protected boolean shouldOverrideLoadClass(String name) | |