OPENJPA-346

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@571269 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Patrick Linskey 2007-08-30 18:38:33 +00:00
parent 3a78ec68ac
commit a7777cb075
1 changed files with 17 additions and 7 deletions

View File

@ -60,14 +60,24 @@ public class PCEnhancerAgent {
public static void premain(String args, Instrumentation inst) {
Options opts = Configurations.parseProperties(args);
if (opts.getBooleanProperty(
"ClassLoadEnhancement", "classLoadEnhancement", true))
registerClassLoadEnhancer(inst, opts);
// Deprecated property setting
if (opts.getBooleanProperty(
"RuntimeEnhancement", "runtimeEnhancement", true))
if (opts.containsKey("ClassLoadEnhancement") ||
opts.containsKey("classLoadEnhancement")) {
if (opts.getBooleanProperty(
"ClassLoadEnhancement", "classLoadEnhancement", true))
registerClassLoadEnhancer(inst, opts);
}
else if (opts.containsKey("RuntimeEnhancement") ||
opts.containsKey("runtimeEnhancement")) {
// Deprecated property setting
if (opts.getBooleanProperty(
"RuntimeEnhancement", "runtimeEnhancement", true))
registerClassLoadEnhancer(inst, opts);
} else {
// if neither is set, then we should be turning it on. We need this
// logic instead of just a getBooleanProperty() because of the
// backwards-compat logic flow.
registerClassLoadEnhancer(inst, opts);
}
if (opts.getBooleanProperty(
"RuntimeRedefinition", "runtimeRedefinition", true)) {