Class PCEnhancerAgent
- java.lang.Object
- 
- org.apache.openjpa.enhance.PCEnhancerAgent
 
- 
 public class PCEnhancerAgent extends java.lang.ObjectJava agent that makes persistent classes work with OpenJPA at runtime. This is achieved by either running the enhancer on the classes as they are loaded, or by redefining the classes on the fly. The agent is launched at JVM startup from the command line: java -javaagent:openjpa.jar[=<options>]The options string should be formatted as a OpenJPA plugin, and may contain any properties understood by the OpenJPA enhancer or any configuration properties. For example:java -javaagent:openjpa.jarBy default, if specified, the agent runs the OpenJPA enhancer on all classes listed in the first persistence unit as they are loaded, and redefines all other persistent classes when they are encountered. To disable enhancement at class-load time and rely solely on the redefinition logic, set the ClassLoadEnhancement flag to false. To disable redefinition and rely solely on pre-deployment or class-load enhancement, set the RuntimeRedefinition flag to false. java -javaagent:openjpa.jar=ClassLoadEnhancement=false- Author:
- Abe White, Patrick Linskey
 
- 
- 
Constructor SummaryConstructors Constructor Description PCEnhancerAgent()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static voiddisableDynamicAgent()static booleangetLoadSuccessful()static booleanloadDynamicAgent(Log log)static voidpremain(java.lang.String args, java.lang.instrument.Instrumentation inst)
 
- 
- 
- 
Method Detail- 
getLoadSuccessfulpublic static boolean getLoadSuccessful() - Returns:
- True if the Agent has ran successfully. False otherwise.
 
 - 
disableDynamicAgentpublic static void disableDynamicAgent() 
 - 
loadDynamicAgentpublic static boolean loadDynamicAgent(Log log) - Returns:
- True if the agent is loaded successfully
 
 - 
premainpublic static void premain(java.lang.String args, java.lang.instrument.Instrumentation inst)
 
- 
 
-