org.apache.openjpa.enhance
Class PCEnhancerAgent

java.lang.Object
  extended by org.apache.openjpa.enhance.PCEnhancerAgent

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

Author:
Abe White, Patrick Linskey

Constructor Summary
PCEnhancerAgent()
           
 
Method Summary
static void premain(String args, Instrumentation inst)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PCEnhancerAgent

public PCEnhancerAgent()
Method Detail

premain

public static void premain(String args,
                           Instrumentation inst)


Copyright © 2006-2008 Apache Software Foundation. All Rights Reserved.