public class PCEnhancerAgent extends Object
Java 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.jar
By 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
Constructor and Description |
---|
PCEnhancerAgent() |
Modifier and Type | Method and Description |
---|---|
static void |
disableDynamicAgent() |
static boolean |
getLoadSuccessful() |
static boolean |
loadDynamicAgent(Log log) |
static void |
premain(String args,
Instrumentation inst) |
public static boolean getLoadSuccessful()
public static void disableDynamicAgent()
public static boolean loadDynamicAgent(Log log)
public static void premain(String args, Instrumentation inst)
Copyright © 2006–2018 Apache Software Foundation. All rights reserved.