mirror of https://github.com/apache/openjpa.git
OPENJPA-1146: Delete RuntimeUnenhancedClassses and link references to RuntimeUnenhancedClasses
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@788944 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
bc5a51520f
commit
717a3bb508
|
@ -24,7 +24,7 @@ import java.util.Map;
|
||||||
import org.apache.openjpa.datacache.DataCache;
|
import org.apache.openjpa.datacache.DataCache;
|
||||||
import org.apache.openjpa.datacache.DataCacheManager;
|
import org.apache.openjpa.datacache.DataCacheManager;
|
||||||
import org.apache.openjpa.ee.ManagedRuntime;
|
import org.apache.openjpa.ee.ManagedRuntime;
|
||||||
import org.apache.openjpa.enhance.RuntimeUnenhancedClasssesModes;
|
import org.apache.openjpa.enhance.RuntimeUnenhancedClassesModes;
|
||||||
import org.apache.openjpa.event.BrokerFactoryEventManager;
|
import org.apache.openjpa.event.BrokerFactoryEventManager;
|
||||||
import org.apache.openjpa.event.LifecycleEventManager;
|
import org.apache.openjpa.event.LifecycleEventManager;
|
||||||
import org.apache.openjpa.event.OrphanedKeyAction;
|
import org.apache.openjpa.event.OrphanedKeyAction;
|
||||||
|
@ -1537,9 +1537,9 @@ public interface OpenJPAConfiguration
|
||||||
* Return the runtime class optimization setting as one of the
|
* Return the runtime class optimization setting as one of the
|
||||||
* following symbolic constants:
|
* following symbolic constants:
|
||||||
* <ul>
|
* <ul>
|
||||||
* <li>{@link RuntimeUnenhancedClasssesModes#SUPPORTED}</li>
|
* <li>{@link RuntimeUnenhancedClassesModes#SUPPORTED}</li>
|
||||||
* <li>{@link RuntimeUnenhancedClasssesModes#UNSUPPORTED}</li>
|
* <li>{@link RuntimeUnenhancedClassesModes#UNSUPPORTED}</li>
|
||||||
* <li>{@link RuntimeUnenhancedClasssesModes#WARN}</li>
|
* <li>{@link RuntimeUnenhancedClassesModes#WARN}</li>
|
||||||
* </ul>
|
* </ul>
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
|
@ -1550,9 +1550,9 @@ public interface OpenJPAConfiguration
|
||||||
* Set the runtime class optimization setting as one of the
|
* Set the runtime class optimization setting as one of the
|
||||||
* following symbolic constants:
|
* following symbolic constants:
|
||||||
* <ul>
|
* <ul>
|
||||||
* <li>{@link RuntimeUnenhancedClasssesModes#SUPPORTED}</li>
|
* <li>{@link RuntimeUnenhancedClassesModes#SUPPORTED}</li>
|
||||||
* <li>{@link RuntimeUnenhancedClasssesModes#UNSUPPORTED}</li>
|
* <li>{@link RuntimeUnenhancedClassesModes#UNSUPPORTED}</li>
|
||||||
* <li>{@link RuntimeUnenhancedClasssesModes#WARN}</li>
|
* <li>{@link RuntimeUnenhancedClassesModes#WARN}</li>
|
||||||
* </ul>
|
* </ul>
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
|
|
|
@ -28,8 +28,7 @@ import org.apache.openjpa.datacache.ConcurrentQueryCache;
|
||||||
import org.apache.openjpa.datacache.DataCacheManager;
|
import org.apache.openjpa.datacache.DataCacheManager;
|
||||||
import org.apache.openjpa.datacache.DataCacheManagerImpl;
|
import org.apache.openjpa.datacache.DataCacheManagerImpl;
|
||||||
import org.apache.openjpa.ee.ManagedRuntime;
|
import org.apache.openjpa.ee.ManagedRuntime;
|
||||||
import org.apache.openjpa.enhance.PCEnhancerAgent;
|
import org.apache.openjpa.enhance.RuntimeUnenhancedClassesModes;
|
||||||
import org.apache.openjpa.enhance.RuntimeUnenhancedClasssesModes;
|
|
||||||
import org.apache.openjpa.event.BrokerFactoryEventManager;
|
import org.apache.openjpa.event.BrokerFactoryEventManager;
|
||||||
import org.apache.openjpa.event.LifecycleEventManager;
|
import org.apache.openjpa.event.LifecycleEventManager;
|
||||||
import org.apache.openjpa.event.OrphanedKeyAction;
|
import org.apache.openjpa.event.OrphanedKeyAction;
|
||||||
|
@ -538,11 +537,11 @@ public class OpenJPAConfigurationImpl
|
||||||
runtimeUnenhancedClasses = addInt("RuntimeUnenhancedClasses");
|
runtimeUnenhancedClasses = addInt("RuntimeUnenhancedClasses");
|
||||||
runtimeUnenhancedClasses.setAliases(new String[] {
|
runtimeUnenhancedClasses.setAliases(new String[] {
|
||||||
"supported", String.valueOf(
|
"supported", String.valueOf(
|
||||||
RuntimeUnenhancedClasssesModes.SUPPORTED),
|
RuntimeUnenhancedClassesModes.SUPPORTED),
|
||||||
"unsupported", String.valueOf(
|
"unsupported", String.valueOf(
|
||||||
RuntimeUnenhancedClasssesModes.UNSUPPORTED),
|
RuntimeUnenhancedClassesModes.UNSUPPORTED),
|
||||||
"warn", String.valueOf(
|
"warn", String.valueOf(
|
||||||
RuntimeUnenhancedClasssesModes.WARN),
|
RuntimeUnenhancedClassesModes.WARN),
|
||||||
});
|
});
|
||||||
runtimeUnenhancedClasses.setDefault("supported");
|
runtimeUnenhancedClasses.setDefault("supported");
|
||||||
runtimeUnenhancedClasses.setString("supported");
|
runtimeUnenhancedClasses.setString("supported");
|
||||||
|
|
|
@ -89,7 +89,7 @@ public class ManagedClassSubclasser {
|
||||||
|
|
||||||
Log log = conf.getLog(OpenJPAConfiguration.LOG_ENHANCE);
|
Log log = conf.getLog(OpenJPAConfiguration.LOG_ENHANCE);
|
||||||
if (conf.getRuntimeUnenhancedClassesConstant()
|
if (conf.getRuntimeUnenhancedClassesConstant()
|
||||||
!= RuntimeUnenhancedClasssesModes.SUPPORTED) {
|
!= RuntimeUnenhancedClassesModes.SUPPORTED) {
|
||||||
Collection unenhanced = new ArrayList();
|
Collection unenhanced = new ArrayList();
|
||||||
for (Class cls : classes)
|
for (Class cls : classes)
|
||||||
if (!PersistenceCapable.class.isAssignableFrom(cls))
|
if (!PersistenceCapable.class.isAssignableFrom(cls))
|
||||||
|
@ -113,7 +113,7 @@ public class ManagedClassSubclasser {
|
||||||
Message msg = _loc.get("runtime-optimization-disabled",
|
Message msg = _loc.get("runtime-optimization-disabled",
|
||||||
unenhanced);
|
unenhanced);
|
||||||
if (conf.getRuntimeUnenhancedClassesConstant()
|
if (conf.getRuntimeUnenhancedClassesConstant()
|
||||||
== RuntimeUnenhancedClasssesModes.WARN)
|
== RuntimeUnenhancedClassesModes.WARN)
|
||||||
log.warn(msg);
|
log.warn(msg);
|
||||||
else
|
else
|
||||||
throw new UserException(msg);
|
throw new UserException(msg);
|
||||||
|
|
|
@ -1,31 +0,0 @@
|
||||||
/*
|
|
||||||
* Licensed to the Apache Software Foundation (ASF) under one
|
|
||||||
* or more contributor license agreements. See the NOTICE file
|
|
||||||
* distributed with this work for additional information
|
|
||||||
* regarding copyright ownership. The ASF licenses this file
|
|
||||||
* to you under the Apache License, Version 2.0 (the
|
|
||||||
* "License"); you may not use this file except in compliance
|
|
||||||
* with the License. You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing,
|
|
||||||
* software distributed under the License is distributed on an
|
|
||||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
||||||
* KIND, either express or implied. See the License for the
|
|
||||||
* specific language governing permissions and limitations
|
|
||||||
* under the License.
|
|
||||||
*/
|
|
||||||
package org.apache.openjpa.enhance;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Possible values for the <code>openjpa.RuntimeUnenhancedClasses</code>
|
|
||||||
* configuration setting.
|
|
||||||
*
|
|
||||||
* @since 1.0.0
|
|
||||||
*/
|
|
||||||
public interface RuntimeUnenhancedClasssesModes {
|
|
||||||
public final static int SUPPORTED = 0;
|
|
||||||
public final static int UNSUPPORTED = 1;
|
|
||||||
public final static int WARN = 2;
|
|
||||||
}
|
|
|
@ -30,7 +30,7 @@ import org.apache.openjpa.enhance.PCRegistry;
|
||||||
import org.apache.openjpa.enhance.StateManager;
|
import org.apache.openjpa.enhance.StateManager;
|
||||||
import org.apache.openjpa.enhance.ManagedInstanceProvider;
|
import org.apache.openjpa.enhance.ManagedInstanceProvider;
|
||||||
import org.apache.openjpa.enhance.ReflectingPersistenceCapable;
|
import org.apache.openjpa.enhance.ReflectingPersistenceCapable;
|
||||||
import org.apache.openjpa.enhance.RuntimeUnenhancedClasssesModes;
|
import org.apache.openjpa.enhance.RuntimeUnenhancedClassesModes;
|
||||||
import org.apache.openjpa.kernel.FetchConfiguration;
|
import org.apache.openjpa.kernel.FetchConfiguration;
|
||||||
import org.apache.openjpa.kernel.LockManager;
|
import org.apache.openjpa.kernel.LockManager;
|
||||||
import org.apache.openjpa.kernel.OpenJPAStateManager;
|
import org.apache.openjpa.kernel.OpenJPAStateManager;
|
||||||
|
@ -222,7 +222,7 @@ public class ImplHelper {
|
||||||
return (PersistenceCapable.class.isAssignableFrom(type)
|
return (PersistenceCapable.class.isAssignableFrom(type)
|
||||||
|| (type != null
|
|| (type != null
|
||||||
&& (conf == null || conf.getRuntimeUnenhancedClassesConstant()
|
&& (conf == null || conf.getRuntimeUnenhancedClassesConstant()
|
||||||
== RuntimeUnenhancedClasssesModes.SUPPORTED)
|
== RuntimeUnenhancedClassesModes.SUPPORTED)
|
||||||
&& PCRegistry.isRegistered(type)));
|
&& PCRegistry.isRegistered(type)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue