openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From curti...@apache.org
Subject svn commit: r1197994 [1/10] - in /openjpa/trunk: openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/ant/ openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/ openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/ openjpa-jdbc/src/main/java/org/...
Date Sat, 05 Nov 2011 17:17:33 GMT
Author: curtisr7
Date: Sat Nov  5 17:17:26 2011
New Revision: 1197994

URL: http://svn.apache.org/viewvc?rev=1197994&view=rev
Log:
OPENJPA-2057: Reverting previous commits.

Removed:
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/EnumValue.java
Modified:
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/ant/MappingToolTask.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/ant/ReverseMappingToolTask.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/ant/SchemaToolTask.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/JDBCConfigurationImpl.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/MappingFactoryValue.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/MappingRepositoryValue.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/ClassTableJDBCSeq.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/GenericResultObjectProvider.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCBrokerFactory.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCStoreManager.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/PreparedQueryImpl.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/PreparedStatementManagerImpl.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/SQLStoreQuery.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/CollectionParam.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/InstanceofExpression.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/Param.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/ClassMapping.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/FieldMapping.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/MappingRepository.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/MappingTool.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/MetaDataPlusMappingFactory.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/QueryResultMapping.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/ReverseMappingTool.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/ClassNameDiscriminatorStrategy.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/RelationStrategies.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/UntypedPCValueHandler.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/DBCPDriverDataSource.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/DataSourceFactory.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/FileSchemaFactory.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SchemaTool.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/XMLSchemaParser.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/OracleDictionary.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/PostgresDictionary.java
    openjpa/trunk/openjpa-jest/src/main/java/org/apache/openjpa/persistence/jest/JESTContext.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/abstractstore/AbstractStoreBrokerFactory.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/abstractstore/AbstractStoreManager.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/ant/ApplicationIdToolTask.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/ant/PCEnhancerTask.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/AutoDetachValue.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/BrokerFactoryValue.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/BrokerValue.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/CacheMarshallerImpl.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/CacheMarshallersValue.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/MetaDataCacheMaintenance.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/MetaDataRepositoryValue.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfiguration.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfigurationImpl.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/QueryCompilationCacheValue.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/RemoteCommitProviderValue.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/SeqValue.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/SpecificationPlugin.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/AbstractQueryCache.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/Caches.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/DataCacheManager.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/DataCacheManagerImpl.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/DataCacheStoreManager.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/PartitionedDataCache.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/QueryKey.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/ee/InvocationManagedRuntime.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/ApplicationIdTool.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/ClassRedefiner.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/CodeGenerator.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/InstrumentationFactory.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/ManagedClassSubclasser.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCClassFileTransformer.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancerAgent.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/ReflectingPersistenceCapable.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/instrumentation/InstrumentationManager.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/instrumentation/InstrumentationManagerImpl.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/AbstractBrokerFactory.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/AbstractPCResultObjectProvider.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/AttachManager.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/Bootstrap.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/Broker.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/BrokerImpl.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/DelegatingBroker.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/DelegatingStoreManager.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/DetachedStateAttachStrategy.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/DetachedValueStateManager.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/ExpressionStoreQuery.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/ExtentImpl.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/QueryImpl.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StoreContext.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StoreManager.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/VersionAttachStrategy.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/AbstractExpressionBuilder.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/CandidatePath.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/Exp.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/InMemoryExpressionFactory.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/jpql/JPQLExpressionBuilder.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/AbstractCFMetaDataFactory.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/AbstractMetaDataFactory.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/ClassMetaData.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/DelegatingMetaDataFactory.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/FieldMetaData.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/JavaTypes.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/MetaDataFactory.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/MetaDataRepository.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/MetaDataTool.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/NoneMetaDataFactory.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/SequenceMetaData.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/ValueMetaDataImpl.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/Id.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/ImplHelper.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/Serialization.java
    openjpa/trunk/openjpa-kernel/src/main/resources/org/apache/openjpa/kernel/localizer.properties
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/ant/AbstractTask.java
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/AbstractProductDerivation.java
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/BooleanValue.java
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/BootstrapException.java
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/Configuration.java
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ConfigurationImpl.java
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ConfigurationProvider.java
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/Configurations.java
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/DoubleValue.java
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/FileValue.java
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/IntValue.java
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/MapConfigurationProvider.java
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ObjectValue.java
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/PluginListValue.java
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/PluginValue.java
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ProductDerivation.java
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ProductDerivations.java
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/StringListValue.java
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/StringValue.java
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/Value.java
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ValueListener.java
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/instrumentation/AbstractInstrumentationProvider.java
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/CFMetaDataParser.java
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/ClassArgParser.java
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/ClassMetaDataIterator.java
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/MetaDataParser.java
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/ResourceMetaDataIterator.java
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/SourceTracker.java
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/XMLMetaDataParser.java
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/XMLVersionParser.java
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/JavaVendors.java
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/MultiClassLoader.java
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/Services.java
    openjpa/trunk/openjpa-lib/src/main/resources/org/apache/openjpa/lib/conf/localizer.properties
    openjpa/trunk/openjpa-lib/src/test/java/org/apache/openjpa/lib/conf/TestValue.java
    openjpa/trunk/openjpa-lib/src/test/java/org/apache/openjpa/lib/conf/test/ConfigurationTestProductDerivation.java
    openjpa/trunk/openjpa-lib/src/test/java/org/apache/openjpa/lib/conf/test/TestConfigurationImpl.java
    openjpa/trunk/openjpa-lib/src/test/java/org/apache/openjpa/lib/conf/test/TestPluginValue.java
    openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/JDBCPersistenceProductDerivation.java
    openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/XMLPersistenceMappingParser.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/AbstractUnenhancedClassTest.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/RestrictedMetaDataRepository.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/enhance/TestEnhancementWithMultiplePUs.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jdbc/kernel/TestJDBCStoreOptSelect.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jdbc/meta/TestMappingToolTemporal.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/kernel/TestDynamicClassRegistration.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/lib/conf/TestAnchorParsing.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/TestExplicitAccess.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/annotations/TestVersion.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/annotations/xml/TestMetaDataComplete.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/cache/jpa/AbstractCacheModeTestCase.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/cache/jpa/TestCacheModeInvalid.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/compat/TestEmbeddableSuperclass.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/CacheTest.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/TestPartitionedDataCache.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/stats/TestStatistics.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/dynamicschema/TestDynamicSchemas.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/embed/TestEmbeddable.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/enhance/TestNoNoArgs.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/enhance/TestSubclassedBehavior.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/event/TestLifecycleEventManager.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/generationtype/TestTableGeneratorMultithreaded.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/graph/TestPersistentGraph.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/TestSharedUnqualifiedClassNames.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/TestFKColumnNames.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/annotations/TestDiscriminator.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/annotations/TestEJBEmbedded.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/annotations/TestEmbeddableSuperclass.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/annotations/TestEnumerated.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/annotations/TestExtensionAnnotations.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/annotations/TestGenerators.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/annotations/TestMapKey.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/annotations/TestTablePerClassInheritance.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/annotations/TestVersion.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/kernel/JDBCTestCase.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/kernel/TestDataStoreTrips.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/kernel/TestEfficientAttach.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/kernel/TestIncrementalJDBCFlushes.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/mapping/bidi/TestOneSidedParentChildWithImplicitForeignKey.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/meta/TestJDBCType.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/meta/TestJoinToBaseClass.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/meta/TestMappedByKeyMaps.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/meta/TestMetaDataValueIndicator.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/order/TestOrderColumn.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/order/TestOrderColumnXML.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/query/JDBCTestCase.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/query/TestSQLQueries.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/schema/TestClassDBSequenceFactory.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/schema/TestClassSequenceFactory.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/schema/TestDBSequenceFactory.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/schema/TestDynamicSchemaFactory.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/schema/TestPerClassSequenceFactory.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/schema/TestSequenceGeneratorEnsureCapacityCall.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/sqlcache/TestPreparedQueryCache.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/kernel/TestPCClass.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/kernel/TestPersistenceManagerFactoryImpl.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/managedinterface/TestSimpleManagedInterface.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/meta/TestClassMetaData.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/meta/TestFactoryMethod.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/meta/TestNonPersistentFields.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/meta/TestPersistentClasses.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/meta/TestQueryTypeAliasRegistration.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/meta/TestValueStrategies.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/meta/TestXMLPersistenceMetaDataSerializer.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/query/TestAccessPathsOfSubqueries.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/query/TestNamedQueries.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/test/ContainerEMFTest.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/test/SingleEMFTestCase.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/util/TestJPAFacadeHelper.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/xml/TestXmlOverrideEntity.java
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceMetaDataParser.java
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerFactoryValue.java
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerImpl.java
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/HintHandler.java
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/JPAFacadeHelper.java
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/OpenJPAEntityManager.java
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/OpenJPAPersistence.java
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceMetaDataDefaults.java
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceMetaDataFactory.java
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProductDerivation.java
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProviderImpl.java
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceUnitInfoImpl.java
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/StoreCacheImpl.java
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataParser.java
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataSerializer.java
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/criteria/CriteriaExpressionBuilder.java
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/criteria/Expressions.java
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/meta/MetamodelImpl.java
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/osgi/BundleDelegatingClassLoader.java
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/osgi/BundleUtils.java
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/validation/ValidationUtils.java
    openjpa/trunk/openjpa-persistence/src/main/resources/org/apache/openjpa/persistence/localizer.properties
    openjpa/trunk/openjpa-persistence/src/test/java/org/apache/openjpa/persistence/TestPersistenceProductDerivation.java
    openjpa/trunk/openjpa-slice/src/main/java/org/apache/openjpa/slice/jdbc/DistributedJDBCBrokerFactory.java
    openjpa/trunk/openjpa-slice/src/main/java/org/apache/openjpa/slice/jdbc/DistributedJDBCConfigurationImpl.java
    openjpa/trunk/openjpa-slice/src/main/java/org/apache/openjpa/slice/jdbc/DistributedStoreQuery.java
    openjpa/trunk/openjpa-slice/src/test/java/org/apache/openjpa/slice/SingleEMFTestCase.java
    openjpa/trunk/openjpa-xmlstore/src/main/java/org/apache/openjpa/xmlstore/XMLFileHandler.java

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/ant/MappingToolTask.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/ant/MappingToolTask.java?rev=1197994&r1=1197993&r2=1197994&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/ant/MappingToolTask.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/ant/MappingToolTask.java Sat Nov  5 17:17:26 2011
@@ -31,7 +31,6 @@ import org.apache.openjpa.lib.conf.Confi
 import org.apache.openjpa.lib.util.Files;
 import org.apache.openjpa.lib.util.J2DoPrivHelper;
 import org.apache.openjpa.lib.util.Localizer;
-import org.apache.openjpa.lib.util.MultiClassLoader;
 import org.apache.openjpa.util.MultiLoaderClassResolver;
 
 /**
@@ -187,15 +186,19 @@ public class MappingToolTask
         throws Exception {
         if (MappingTool.ACTION_IMPORT.equals(flags.action))
             assertFiles(files);
-        MultiClassLoader loader = new MultiClassLoader();
-        ClassLoader toolLoader = AccessController.doPrivileged(J2DoPrivHelper
+
+        ClassLoader toolLoader = AccessController
+                .doPrivileged(J2DoPrivHelper
                         .getClassLoaderAction(MappingTool.class));
-        loader.addClassLoader(toolLoader);
+        ClassLoader loader = toolLoader;
+        MultiLoaderClassResolver resolver = new MultiLoaderClassResolver();
 
         if (tmpClassLoader) {
-            loader.addClassLoader(AccessController.doPrivileged(J2DoPrivHelper
-                    .newTemporaryClassLoaderAction(getClassLoader())));
+            loader = AccessController.doPrivileged(J2DoPrivHelper
+                    .newTemporaryClassLoaderAction(getClassLoader()));
+            resolver.addClassLoader(loader);
         }
+        resolver.addClassLoader(toolLoader);
             
         if (flags.meta && MappingTool.ACTION_ADD.equals(flags.action))
             flags.metaDataFile = Files.getFile(file, loader);
@@ -206,11 +209,11 @@ public class MappingToolTask
         flags.sqlWriter = Files.getWriter(sqlFile, loader, sqlEncode);
 
         JDBCConfiguration conf = (JDBCConfiguration) getConfiguration();
-        conf.addClassLoader(loader);
+        conf.setClassResolver(resolver);
         
-        if (!MappingTool.run(conf, files, flags, loader)) {
-            throw new BuildException(_loc.get("bad-conf", "MappingToolTask").getMessage());
-        }
+        if (!MappingTool.run(conf, files, flags, loader))
+            throw new BuildException(_loc.get("bad-conf", "MappingToolTask")
+                .getMessage());
     }
 
     public static class Action
@@ -226,7 +229,8 @@ public class MappingToolTask
 
         public String[] getValues() {
             String[] actions = new String[SchemaTool.ACTIONS.length + 1];
-            System.arraycopy(SchemaTool.ACTIONS, 0, actions, 0, SchemaTool.ACTIONS.length);
+            System.arraycopy(SchemaTool.ACTIONS, 0, actions, 0,
+                SchemaTool.ACTIONS.length);
             actions[actions.length - 1] = "none";
             return actions;
         }

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/ant/ReverseMappingToolTask.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/ant/ReverseMappingToolTask.java?rev=1197994&r1=1197993&r2=1197994&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/ant/ReverseMappingToolTask.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/ant/ReverseMappingToolTask.java Sat Nov  5 17:17:26 2011
@@ -276,7 +276,11 @@ public class ReverseMappingToolTask
 
         // create and configure customizer
         JDBCConfiguration conf = (JDBCConfiguration) getConfiguration();
-        flags.customizer = (ReverseCustomizer) Configurations.newInstance(customizerClass, conf, (String)null);
+        flags.customizer = (ReverseCustomizer) Configurations.
+            newInstance(customizerClass, conf, (String)null,
+                AccessController.doPrivileged(
+                    J2DoPrivHelper.getClassLoaderAction(
+                        ReverseCustomizer.class)));
         if (flags.customizer != null)
             flags.customizer.setConfiguration(customProps);
 

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/ant/SchemaToolTask.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/ant/SchemaToolTask.java?rev=1197994&r1=1197993&r2=1197994&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/ant/SchemaToolTask.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/ant/SchemaToolTask.java Sat Nov  5 17:17:26 2011
@@ -131,8 +131,7 @@ public class SchemaToolTask
         this.file = file;
     }
 
-    @Override
-    protected JDBCConfigurationImpl newConfiguration() {
+    protected ConfigurationImpl newConfiguration() {
         return new JDBCConfigurationImpl();
     }
 

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/JDBCConfigurationImpl.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/JDBCConfigurationImpl.java?rev=1197994&r1=1197993&r2=1197994&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/JDBCConfigurationImpl.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/JDBCConfigurationImpl.java Sat Nov  5 17:17:26 2011
@@ -42,12 +42,9 @@ import org.apache.openjpa.jdbc.sql.DBDic
 import org.apache.openjpa.jdbc.sql.MaxDBDictionary;
 import org.apache.openjpa.jdbc.sql.SQLFactory;
 import org.apache.openjpa.kernel.BrokerImpl;
-import org.apache.openjpa.kernel.FinderCache;
-import org.apache.openjpa.kernel.PreparedQueryCache;
 import org.apache.openjpa.kernel.StoreContext;
 import org.apache.openjpa.lib.conf.IntValue;
 import org.apache.openjpa.lib.conf.ObjectValue;
-import org.apache.openjpa.lib.conf.PluginListValue;
 import org.apache.openjpa.lib.conf.PluginValue;
 import org.apache.openjpa.lib.conf.ProductDerivations;
 import org.apache.openjpa.lib.conf.StringListValue;
@@ -80,16 +77,16 @@ public class JDBCConfigurationImpl
     public FetchModeValue subclassFetchMode;
     public IntValue lrsSize;
     public StringValue synchronizeMappings;
-    public PluginListValue<JDBCListener> jdbcListenerPlugins;
-    public PluginListValue<ConnectionDecorator> connectionDecoratorPlugins;
-    public PluginValue<DBDictionary> dbdictionaryPlugin;
-    public ObjectValue<UpdateManager> updateManagerPlugin;
-    public ObjectValue<SchemaFactory> schemaFactoryPlugin;
-    public ObjectValue<SQLFactory> sqlFactoryPlugin;
-    public ObjectValue<MappingDefaults> mappingDefaultsPlugin;
-    public PluginValue<DriverDataSource> driverDataSourcePlugin;
+    public ObjectValue jdbcListenerPlugins;
+    public ObjectValue connectionDecoratorPlugins;
+    public PluginValue dbdictionaryPlugin;
+    public ObjectValue updateManagerPlugin;
+    public ObjectValue schemaFactoryPlugin;
+    public ObjectValue sqlFactoryPlugin;
+    public ObjectValue mappingDefaultsPlugin;
+    public PluginValue driverDataSourcePlugin;
     public MappingFactoryValue mappingFactoryPlugin;
-    public ObjectValue<DBIdentifierUtil> identifierUtilPlugin;
+    public ObjectValue identifierUtilPlugin;
 
     // used internally
     private String firstUser = null;
@@ -195,15 +192,15 @@ public class JDBCConfigurationImpl
         synchronizeMappings.setAliases(aliases);
         synchronizeMappings.setDefault(aliases[0]);
 
-        jdbcListenerPlugins = addPluginList(JDBCListener[].class, "jdbc.JDBCListeners");
+        jdbcListenerPlugins = addPluginList("jdbc.JDBCListeners");
         jdbcListenerPlugins.setInstantiatingGetter("getJDBCListenerInstances");
 
-        connectionDecoratorPlugins = addPluginList(ConnectionDecorator[].class,
-            "jdbc.ConnectionDecorators");
+        connectionDecoratorPlugins = addPluginList
+            ("jdbc.ConnectionDecorators");
         connectionDecoratorPlugins.setInstantiatingGetter
             ("getConnectionDecoratorInstances");
 
-        dbdictionaryPlugin = addPlugin(DBDictionary.class, "jdbc.DBDictionary", true);
+        dbdictionaryPlugin = addPlugin("jdbc.DBDictionary", true);
         aliases = new String[]{
             "access", "org.apache.openjpa.jdbc.sql.AccessDictionary",
             "db2", "org.apache.openjpa.jdbc.sql.DB2Dictionary",
@@ -227,7 +224,7 @@ public class JDBCConfigurationImpl
         dbdictionaryPlugin.setAliases(aliases);
         dbdictionaryPlugin.setInstantiatingGetter("getDBDictionaryInstance");
 
-        updateManagerPlugin = addPlugin(UpdateManager.class, "jdbc.UpdateManager", true);
+        updateManagerPlugin = addPlugin("jdbc.UpdateManager", true);
         aliases = new String[]{
             "default",
             BatchingConstraintUpdateManager.class.getName(),
@@ -245,7 +242,7 @@ public class JDBCConfigurationImpl
         updateManagerPlugin.setString(aliases[0]);
         updateManagerPlugin.setInstantiatingGetter("getUpdateManagerInstance");
 
-        driverDataSourcePlugin = addPlugin(DriverDataSource.class, "jdbc.DriverDataSource", false);
+        driverDataSourcePlugin = addPlugin("jdbc.DriverDataSource", false);
         aliases = new String[]{
             "auto", "org.apache.openjpa.jdbc.schema.AutoDriverDataSource",
             "simple", "org.apache.openjpa.jdbc.schema.SimpleDriverDataSource",
@@ -255,7 +252,7 @@ public class JDBCConfigurationImpl
         driverDataSourcePlugin.setDefault(aliases[0]);
         driverDataSourcePlugin.setString(aliases[0]);
 
-        schemaFactoryPlugin = addPlugin(SchemaFactory.class, "jdbc.SchemaFactory", true);
+        schemaFactoryPlugin = addPlugin("jdbc.SchemaFactory", true);
         aliases = new String[]{
             "dynamic", "org.apache.openjpa.jdbc.schema.DynamicSchemaFactory",
             "native", "org.apache.openjpa.jdbc.schema.LazySchemaFactory",
@@ -269,7 +266,7 @@ public class JDBCConfigurationImpl
         schemaFactoryPlugin.setString(aliases[0]);
         schemaFactoryPlugin.setInstantiatingGetter("getSchemaFactoryInstance");
 
-        sqlFactoryPlugin = addPlugin(SQLFactory.class, "jdbc.SQLFactory", true);
+        sqlFactoryPlugin = addPlugin("jdbc.SQLFactory", true);
         aliases = new String[]{
             "default", "org.apache.openjpa.jdbc.sql.SQLFactoryImpl",
         };
@@ -281,14 +278,15 @@ public class JDBCConfigurationImpl
         mappingFactoryPlugin = new MappingFactoryValue("jdbc.MappingFactory");
         addValue(mappingFactoryPlugin);
 
-        mappingDefaultsPlugin = addPlugin(MappingDefaults.class, "jdbc.MappingDefaults", true);
+        mappingDefaultsPlugin = addPlugin("jdbc.MappingDefaults", true);
         aliases = new String[]{
             "default", "org.apache.openjpa.jdbc.meta.MappingDefaultsImpl",
         };
         mappingDefaultsPlugin.setAliases(aliases);
         mappingDefaultsPlugin.setDefault(aliases[0]);
         mappingDefaultsPlugin.setString(aliases[0]);
-        mappingDefaultsPlugin.setInstantiatingGetter("getMappingDefaultsInstance");
+        mappingDefaultsPlugin.setInstantiatingGetter
+            ("getMappingDefaultsInstance");
 
         // set up broker factory defaults
         brokerFactoryPlugin.setAlias("jdbc", JDBCBrokerFactory.class.getName());
@@ -319,7 +317,7 @@ public class JDBCConfigurationImpl
         // This plug-in is declared in superclass but defined here
         // because PreparedQueryCache is currently available for JDBC
         // backend only
-        preparedQueryCachePlugin = addPlugin(PreparedQueryCache.class, "jdbc.QuerySQLCache", true);
+        preparedQueryCachePlugin = addPlugin("jdbc.QuerySQLCache", true);
         aliases = new String[] {
             "true", "org.apache.openjpa.jdbc.kernel.PreparedQueryCacheImpl",
             "false", null
@@ -332,7 +330,7 @@ public class JDBCConfigurationImpl
         preparedQueryCachePlugin.setInstantiatingGetter(
                 "getQuerySQLCacheInstance");
 
-        finderCachePlugin = addPlugin(FinderCache.class, "jdbc.FinderCache", true);
+        finderCachePlugin = addPlugin("jdbc.FinderCache", true);
         aliases = new String[] {
             "true", "org.apache.openjpa.jdbc.kernel.FinderCacheImpl",
             "false", null
@@ -344,7 +342,7 @@ public class JDBCConfigurationImpl
         finderCachePlugin.setDynamic(true);
         finderCachePlugin.setInstantiatingGetter("getFinderCacheInstance");
 
-        identifierUtilPlugin = addPlugin(DBIdentifierUtil.class, "jdbc.IdentifierUtil", true);
+        identifierUtilPlugin = addPlugin("jdbc.IdentifierUtil", true);
         aliases = new String[] { 
             "default", "org.apache.openjpa.jdbc.identifier.DBIdentifierUtilImpl" };
         identifierUtilPlugin.setAliases(aliases);
@@ -527,8 +525,8 @@ public class JDBCConfigurationImpl
 
     public JDBCListener[] getJDBCListenerInstances() {
         if (jdbcListenerPlugins.get() == null)
-            jdbcListenerPlugins.instantiate(this);
-        return jdbcListenerPlugins.get();
+            jdbcListenerPlugins.instantiate(JDBCListener.class, this);
+        return (JDBCListener[]) jdbcListenerPlugins.get();
     }
 
     public void setConnectionDecorators(String connectionDecorators) {
@@ -545,9 +543,10 @@ public class JDBCConfigurationImpl
 
     public ConnectionDecorator[] getConnectionDecoratorInstances() {
         if (connectionDecoratorPlugins.get() == null) {
-            connectionDecoratorPlugins.instantiate(this);
+            connectionDecoratorPlugins.instantiate
+                (ConnectionDecorator.class, this);
         }
-        return connectionDecoratorPlugins.get();
+        return (ConnectionDecorator[]) connectionDecoratorPlugins.get();
     }
 
     public void setDBDictionary(String dbdictionary) {
@@ -624,8 +623,8 @@ public class JDBCConfigurationImpl
 
     public UpdateManager getUpdateManagerInstance() {
         if (updateManagerPlugin.get() == null)
-            updateManagerPlugin.instantiate(this);
-        return updateManagerPlugin.get();
+            updateManagerPlugin.instantiate(UpdateManager.class, this);
+        return (UpdateManager) updateManagerPlugin.get();
     }
 
     public void setDriverDataSource(String driverDataSource) {
@@ -637,7 +636,8 @@ public class JDBCConfigurationImpl
     }
 
     public DriverDataSource newDriverDataSourceInstance() {
-        return driverDataSourcePlugin.instantiate(this);
+        return (DriverDataSource) driverDataSourcePlugin.
+            instantiate(DriverDataSource.class, this);
     }
 
     public void setSchemaFactory(String schemaFactory) {
@@ -654,8 +654,8 @@ public class JDBCConfigurationImpl
 
     public SchemaFactory getSchemaFactoryInstance() {
         if (schemaFactoryPlugin.get() == null)
-            schemaFactoryPlugin.instantiate(this);
-        return schemaFactoryPlugin.get();
+            schemaFactoryPlugin.instantiate(SchemaFactory.class, this);
+        return (SchemaFactory) schemaFactoryPlugin.get();
     }
 
     public void setSQLFactory(String sqlFactory) {
@@ -672,8 +672,8 @@ public class JDBCConfigurationImpl
 
     public SQLFactory getSQLFactoryInstance() {
         if (sqlFactoryPlugin.get() == null)
-            sqlFactoryPlugin.instantiate(this);
-        return sqlFactoryPlugin.get();
+            sqlFactoryPlugin.instantiate(SQLFactory.class, this);
+        return (SQLFactory) sqlFactoryPlugin.get();
     }
 
     public String getMappingFactory() {
@@ -703,8 +703,8 @@ public class JDBCConfigurationImpl
 
     public MappingDefaults getMappingDefaultsInstance() {
         if (mappingDefaultsPlugin.get() == null)
-            mappingDefaultsPlugin.instantiate(this);
-        return mappingDefaultsPlugin.get();
+            mappingDefaultsPlugin.instantiate(MappingDefaults.class, this);
+        return (MappingDefaults) mappingDefaultsPlugin.get();
     }
 
     public MappingRepository getMappingRepositoryInstance() {
@@ -989,8 +989,8 @@ public class JDBCConfigurationImpl
 
     public DBIdentifierUtil getIdentifierUtilInstance() {
         if (identifierUtilPlugin.get() == null)
-            identifierUtilPlugin.instantiate(this);
-        return identifierUtilPlugin.get();
+            identifierUtilPlugin.instantiate(DBIdentifierUtil.class, this);
+        return (DBIdentifierUtil) identifierUtilPlugin.get();
     }
 
     public void setIdentifierUtil(DBIdentifierUtil util) {

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/MappingFactoryValue.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/MappingFactoryValue.java?rev=1197994&r1=1197993&r2=1197994&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/MappingFactoryValue.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/MappingFactoryValue.java Sat Nov  5 17:17:26 2011
@@ -36,15 +36,16 @@ import org.apache.openjpa.meta.MetaDataF
  * @nojavadoc
  */
 public class MappingFactoryValue
-    extends PluginValue<MetaDataFactory> {
+    extends PluginValue {
 
-    private static final Localizer _loc = Localizer.forPackage(MappingFactoryValue.class);
+    private static final Localizer _loc = Localizer.forPackage
+        (MappingFactoryValue.class);
 
     private String[] _metaFactoryDefaults = null;
     private String[] _mappedMetaFactoryDefaults = null;
 
     public MappingFactoryValue(String prop) {
-        super(MetaDataFactory.class, prop, false);
+        super(prop, false);
     }
 
     /**
@@ -56,7 +57,8 @@ public class MappingFactoryValue
      */
     public void setMetaDataFactoryDefault(String metaAlias,
         String mappingAlias) {
-        _metaFactoryDefaults = setAlias(metaAlias, mappingAlias, _metaFactoryDefaults);
+        _metaFactoryDefaults = setAlias(metaAlias, mappingAlias,
+            _metaFactoryDefaults);
     }
 
     /**
@@ -70,20 +72,20 @@ public class MappingFactoryValue
     }
 
     /**
-     * Instantiate a {@link MetaDataFactory} responsible for both metadata and
+     * Intantiate a {@link MetaDataFactory} responsible for both metadata and
      * mapping.
      */
     public MetaDataFactory instantiateMetaDataFactory(Configuration conf,
-        PluginValue<MetaDataFactory> metaPlugin, String mapping) {
+        PluginValue metaPlugin, String mapping) {
         return instantiateMetaDataFactory(conf, metaPlugin, mapping, true);
     }
 
     /**
-     * Instantiate a {@link MetaDataFactory} responsible for both metadata and
+     * Intantiate a {@link MetaDataFactory} responsible for both metadata and
      * mapping.
      */
     public MetaDataFactory instantiateMetaDataFactory(Configuration conf,
-        PluginValue<MetaDataFactory> metaPlugin, String mapping, boolean fatal) {
+        PluginValue metaPlugin, String mapping, boolean fatal) {
         String clsName = getClassName();
         String props = getProperties();
         String metaClsName = metaPlugin.getClassName();
@@ -93,13 +95,14 @@ public class MappingFactoryValue
         if (StringUtils.isEmpty(clsName)) {
             String def;
             if (!StringUtils.isEmpty(mapping)) {
-                def = unalias(metaPlugin.alias(metaClsName), _mappedMetaFactoryDefaults, true);
-                if (def != null) {
+                def = unalias(metaPlugin.alias(metaClsName),
+                    _mappedMetaFactoryDefaults, true);
+                if (def != null)
                     clsName = unalias(def);
-                }
             }
             if (StringUtils.isEmpty(clsName)) {
-                def = unalias(metaPlugin.alias(metaClsName), _metaFactoryDefaults, true);
+                def = unalias(metaPlugin.alias(metaClsName),
+                    _metaFactoryDefaults, true);
                 if (def != null)
                     clsName = unalias(def);
             }
@@ -108,16 +111,17 @@ public class MappingFactoryValue
         // if mapping factory and metadata factory the same, combine
         // into metadata factory
         if (clsName != null && clsName.equals(metaClsName)) {
-            if (props != null && metaProps == null) {
+            if (props != null && metaProps == null)
                 metaProps = props;
-            } else if (props != null)
+            else if (props != null)
                 metaProps += "," + props;
             clsName = null;
             props = null;
         }
 
         // instantiate factories
-        MetaDataFactory map = newInstance(clsName, conf, fatal);
+        MetaDataFactory map = (MetaDataFactory) newInstance(clsName,
+            MetaDataFactory.class, conf, fatal);
         MetaDataFactory meta;
         if (map != null
             && map.getClass().getName().indexOf("Deprecated") != -1) {
@@ -126,7 +130,8 @@ public class MappingFactoryValue
             meta = map;
             map = null;
         } else {
-            meta = metaPlugin.newInstance(metaClsName, conf, fatal);
+            meta = (MetaDataFactory) metaPlugin.newInstance
+                (metaClsName, MetaDataFactory.class, conf, fatal);
         }
 
         // configure factories.  if only meta factory, allow user to specify
@@ -137,8 +142,10 @@ public class MappingFactoryValue
             else
                 metaProps += ", " + props;
         }
-        Configurations.configureInstance(map, conf, props, (fatal) ? getProperty() : null);
-        Configurations.configureInstance(meta, conf, metaProps, (fatal) ? metaPlugin.getProperty() : null);
+        Configurations.configureInstance(map, conf, props,
+            (fatal) ? getProperty() : null);
+        Configurations.configureInstance(meta, conf, metaProps,
+            (fatal) ? metaPlugin.getProperty() : null);
 
         Log log = conf.getLog(JDBCConfiguration.LOG_METADATA);
         if (log.isTraceEnabled()) {
@@ -149,12 +156,20 @@ public class MappingFactoryValue
 
         // if no mapping setting, return meta factory alone, assuming it handles
         // both metadata and mapping
-        if (map == null) { 
-            return meta;
-        } else {
-        	boolean strict = (conf instanceof OpenJPAConfiguration) 
-        	    && ((OpenJPAConfiguration)conf).getCompatibilityInstance().getMetaFactoriesAreStrict();
-            return new MetaDataPlusMappingFactory(meta, map, strict);
+        MetaDataFactory ret = null;
+        if(map == null ) { 
+            ret = meta;
+        }
+        else {
+            if( conf instanceof OpenJPAConfiguration) {
+                ret = new MetaDataPlusMappingFactory(meta, map, (OpenJPAConfiguration) conf);
+            }
+            else {
+                ret = new MetaDataPlusMappingFactory(meta, map);
+            }
         }
+        
+        return ret; 
+        
     }
 }

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/MappingRepositoryValue.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/MappingRepositoryValue.java?rev=1197994&r1=1197993&r2=1197994&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/MappingRepositoryValue.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/MappingRepositoryValue.java Sat Nov  5 17:17:26 2011
@@ -36,19 +36,20 @@ import serp.util.Strings;
  * @nojavadoc
  */
 public class MappingRepositoryValue
-    extends PluginValue<MappingRepository> {
+    extends PluginValue {
 
     public MappingRepositoryValue(String prop) {
-        super(MappingRepository.class, prop, true);
+        super(prop, true);
     }
 
-    public MappingRepository newInstance(String clsName, Configuration conf, boolean fatal) {
+    public Object newInstance(String clsName, Class type,
+        Configuration conf, boolean fatal) {
         // since the MappingRepository takes a JDBConfiguration constructor,
         // we need to manually perform the instantiation
         try {
-            Class<MappingRepository> cls = Strings.toClass(clsName,
+            Class cls = Strings.toClass(clsName,
                 AccessController.doPrivileged(
-                    J2DoPrivHelper.getClassLoaderAction(getValueType())));        
+                    J2DoPrivHelper.getClassLoaderAction(type)));        
             return cls.getConstructor(new Class[]{ JDBCConfiguration.class }).
                 newInstance(new Object[]{ conf });
         } catch (RuntimeException e) {
@@ -58,10 +59,10 @@ public class MappingRepositoryValue
                 throw(RuntimeException) e.getTargetException();
 
             // fall back to default behavior for better error reporting
-            return super.newInstance(clsName, conf, fatal);
+            return super.newInstance(clsName, type, conf, fatal);
         } catch (Exception e) {
             // fall back to default behavior for better error reporting
-            return super.newInstance(clsName, conf, fatal);
+            return super.newInstance(clsName, type, conf, fatal);
         }
     }
 }

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/ClassTableJDBCSeq.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/ClassTableJDBCSeq.java?rev=1197994&r1=1197993&r2=1197994&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/ClassTableJDBCSeq.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/ClassTableJDBCSeq.java Sat Nov  5 17:17:26 2011
@@ -187,16 +187,18 @@ public class ClassTableJDBCSeq 
     /**
      * Run the tool. Returns false if invalid options were given.
      */
-    public static boolean run(JDBCConfiguration conf, String[] args, Options opts) throws Exception {
+    public static boolean run(JDBCConfiguration conf, String[] args,
+        Options opts) throws Exception {
         String action = opts.removeProperty("action", "a", null);
         Configurations.populateConfiguration(conf, opts);
-        return run(conf, args, action, null);
+        return run(conf, args, action, null, null);
     }
 
     /**
      * Run the tool. Return false if an invalid option was given.
      */
-    public static boolean run(JDBCConfiguration conf, String[] args, String action, MappingRepository repos)
+    public static boolean run(JDBCConfiguration conf, String[] args,
+        String action, MappingRepository repos, ClassLoader loader)
         throws Exception {
         ClassTableJDBCSeq seq = new ClassTableJDBCSeq();
         String props = Configurations.getProperties(conf.getSequence());
@@ -214,14 +216,18 @@ public class ClassTableJDBCSeq 
             if (args.length == 0)
                 return false;
 
+            if (loader == null)
+                loader = conf.getClassResolverInstance().getClassLoader(
+                    ClassTableJDBCSeq.class, null);
+
             ClassArgParser cap = conf.getMetaDataRepositoryInstance()
                 .getMetaDataFactory().newClassArgParser();
-            cap.setClassLoader(conf.getClassLoader());
+            cap.setClassLoader(loader);
             Class<?> cls = cap.parseTypes(args[0])[0];
 
             if (repos == null)
                 repos = conf.getMappingRepositoryInstance();
-            ClassMapping mapping = repos.getMapping(cls, true);
+            ClassMapping mapping = repos.getMapping(cls, null, true);
 
             Connection conn = conf.getDataSource2(null).getConnection();
             try {

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/GenericResultObjectProvider.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/GenericResultObjectProvider.java?rev=1197994&r1=1197993&r2=1197994&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/GenericResultObjectProvider.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/GenericResultObjectProvider.java Sat Nov  5 17:17:26 2011
@@ -49,8 +49,11 @@ public class GenericResultObjectProvider
      * @param fetch the fetch configuration, or null for default
      * @param res the result containing the data
      */
-    public GenericResultObjectProvider(Class<?> pcClass, JDBCStore store, JDBCFetchConfiguration fetch, Result res) {
-        this(store.getConfiguration().getMappingRepositoryInstance().getMapping(pcClass, true), store, fetch, res);
+    public GenericResultObjectProvider(Class<?> pcClass,
+        JDBCStore store, JDBCFetchConfiguration fetch, Result res) {
+        this(store.getConfiguration().getMappingRepositoryInstance().getMapping
+            (pcClass, store.getContext().getClassLoader(), true),
+            store, fetch, res);
     }
 
     /**

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCBrokerFactory.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCBrokerFactory.java?rev=1197994&r1=1197993&r2=1197994&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCBrokerFactory.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCBrokerFactory.java Sat Nov  5 17:17:26 2011
@@ -65,7 +65,7 @@ public class JDBCBrokerFactory
      * Factory method for obtaining a possibly-pooled factory from properties.
      * Invoked from {@link Bootstrap#getBrokerFactory}.
      */
-    public static JDBCBrokerFactory getInstance(ConfigurationProvider cp) {
+    public static JDBCBrokerFactory getInstance(ConfigurationProvider cp, ClassLoader loader) {
         Map<String, Object> props = cp.getProperties();
         Object key = toPoolKey(props);
         JDBCBrokerFactory factory = (JDBCBrokerFactory) getPooledFactoryForKey(key);
@@ -73,7 +73,7 @@ public class JDBCBrokerFactory
             return factory;
         
         // The creation of all BrokerFactories should be driven through Bootstrap.
-        factory = (JDBCBrokerFactory) Bootstrap.newBrokerFactory(cp);
+        factory = (JDBCBrokerFactory) Bootstrap.newBrokerFactory(cp, loader);
         pool(key, factory);
         return factory;
     }
@@ -119,7 +119,7 @@ public class JDBCBrokerFactory
             // global login is given
             if (!_synchronizedMappings) {
                 _synchronizedMappings = true;
-                synchronizeMappings();
+                synchronizeMappings(broker.getClassLoader());
             }
 
             return broker;
@@ -131,13 +131,14 @@ public class JDBCBrokerFactory
     /**
      * Synchronize the mappings of the classes listed in the configuration.
      */
-    protected void synchronizeMappings(JDBCConfiguration conf) {
+    protected void synchronizeMappings(ClassLoader loader, 
+        JDBCConfiguration conf) {
         String action = conf.getSynchronizeMappings();
         if (StringUtils.isEmpty(action))
             return;
 
         MappingRepository repo = conf.getMappingRepositoryInstance();
-        Collection<Class<?>> classes = repo.loadPersistentTypes(false);
+        Collection<Class<?>> classes = repo.loadPersistentTypes(false, loader);
         if (classes.isEmpty())
             return;
 
@@ -159,7 +160,7 @@ public class JDBCBrokerFactory
         tool.record();
     }
     
-    protected void synchronizeMappings() {
-        synchronizeMappings((JDBCConfiguration) getConfiguration());
+    protected void synchronizeMappings(ClassLoader loader) {
+        synchronizeMappings(loader, (JDBCConfiguration) getConfiguration());
     }
 }

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCStoreManager.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCStoreManager.java?rev=1197994&r1=1197993&r2=1197994&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCStoreManager.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCStoreManager.java Sat Nov  5 17:17:26 2011
@@ -1504,7 +1504,8 @@ public class JDBCStoreManager implements
             return;
 
         // if the subclass list is set, no need to load subs
-        if (mapping.getRepository().getPersistentTypeNames(false) != null) {
+        if (mapping.getRepository().getPersistentTypeNames(false,
+            _ctx.getClassLoader()) != null) {
             dsc.setSubclassesLoaded(true);
             return;
         }

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/PreparedQueryImpl.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/PreparedQueryImpl.java?rev=1197994&r1=1197993&r2=1197994&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/PreparedQueryImpl.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/PreparedQueryImpl.java Sat Nov  5 17:17:26 2011
@@ -367,7 +367,8 @@ public class PreparedQueryImpl implement
             .getInnermostDelegate();
         MappingRepository repos = store.getConfiguration()
             .getMappingRepositoryInstance();
-        ClassMapping mapping = repos.getMapping(pc.getClass(), true);
+        ClassMapping mapping = repos.getMapping(pc.getClass(), 
+            broker.getClassLoader(), true);
         Column[] pks = mapping.getPrimaryKeyColumns();
         Object cols = mapping.toDataStoreValue(pc, pks, store);
         if (cols instanceof Object[]) {

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/PreparedStatementManagerImpl.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/PreparedStatementManagerImpl.java?rev=1197994&r1=1197993&r2=1197994&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/PreparedStatementManagerImpl.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/PreparedStatementManagerImpl.java Sat Nov  5 17:17:26 2011
@@ -294,11 +294,11 @@ public class PreparedStatementManagerImp
      * log any SQL warnings that result from the execution of a SQL statement. 
      */
     protected void logSQLWarnings(PreparedStatement stmt) {
-        if (stmt != null && _log != null && _log.isWarnEnabled()) {
+        if (stmt != null && _log != null && _log.isTraceEnabled()) {
             try {
                 SQLWarning warn = stmt.getWarnings();
                 while (warn != null) {
-                    _log.warn(_loc.get("sql-warning", warn.getMessage()));
+                    _log.trace(_loc.get("sql-warning", warn.getMessage()));
                     warn = warn.getNextWarning();
                 }
             } catch (SQLException e) {}

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/SQLStoreQuery.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/SQLStoreQuery.java?rev=1197994&r1=1197993&r2=1197994&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/SQLStoreQuery.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/SQLStoreQuery.java Sat Nov  5 17:17:26 2011
@@ -112,8 +112,12 @@ public class SQLStoreQuery
             if (resultMapping == null)
                 _resultMapping = null;
             else {
-                MappingRepository repos = q.getStore().getConfiguration().getMappingRepositoryInstance();
-                _resultMapping = repos.getQueryResultMapping(ctx.getResultMappingScope(), resultMapping, true);
+                ClassLoader envLoader = ctx.getStoreContext().getClassLoader();
+                MappingRepository repos = q.getStore().getConfiguration().
+                    getMappingRepositoryInstance();
+                _resultMapping = repos.getQueryResultMapping
+                    (ctx.getResultMappingScope(), resultMapping, envLoader,
+                        true);
             }
             _meta = candidate;
 

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/CollectionParam.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/CollectionParam.java?rev=1197994&r1=1197993&r2=1197994&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/CollectionParam.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/CollectionParam.java Sat Nov  5 17:17:26 2011
@@ -138,33 +138,41 @@ public class CollectionParam
         }
     } 
 
-    public void calculateValue(Select sel, ExpContext ctx, ExpState state, Val other, ExpState otherState) {
+    public void calculateValue(Select sel, ExpContext ctx, ExpState state, 
+        Val other, ExpState otherState) {
         super.calculateValue(sel, ctx, state, other, otherState);
         ParamExpState pstate = (ParamExpState) state;
         Object value = getValue(ctx.params);
 
         if (!(value instanceof Collection))
-            throw new IllegalArgumentException(_loc.get("not-collection-parm", _key).toString());
+            throw new IllegalArgumentException(_loc.get(
+                "not-collection-parm", _key).toString());
 
         if (((Collection) value).isEmpty())
-            throw new IllegalArgumentException(_loc.get("empty-collection-parm", _key).toString());
+            throw new IllegalArgumentException(_loc.get(
+                "empty-collection-parm", _key).toString());
 
         Iterator itr = ((Collection) value).iterator();
         for (int i = 0; i < pstate.size && itr.hasNext(); i++) {
             Object val = itr.next();
             if (other != null && !_container) {
-                pstate.sqlValue[i] = other.toDataStoreValue(sel, ctx, otherState, val);
+                pstate.sqlValue[i] = other.toDataStoreValue(sel, ctx,
+                    otherState, val);
                 pstate.otherLength[i] = other.length(sel, ctx, otherState);
                 if (other instanceof Type) {
                     pstate.mapping[i] = ctx.store.getConfiguration().
-                    getMappingRepositoryInstance().getMapping((Class) val, true);
+                    getMappingRepositoryInstance().getMapping((Class) val,
+                        ctx.store.getContext().getClassLoader(), true);
                     pstate.disc[i] = pstate.mapping[i].getDiscriminator();
-                    pstate.discValue[i] = pstate.disc[i] != null ? pstate.disc[i].getValue() : null;
+                    pstate.discValue[i] = pstate.disc[i] != null ?
+                        pstate.disc[i].getValue() : null;
                 }
             } else if (ImplHelper.isManageable(val)) {
                 ClassMapping mapping = ctx.store.getConfiguration().
-                getMappingRepositoryInstance().getMapping(val.getClass(), true);
-                pstate.sqlValue[i] = mapping.toDataStoreValue(val, mapping.getPrimaryKeyColumns(), ctx.store);
+                getMappingRepositoryInstance().getMapping(val.getClass(),
+                    ctx.store.getContext().getClassLoader(), true);
+                pstate.sqlValue[i] = mapping.toDataStoreValue(val,
+                    mapping.getPrimaryKeyColumns(), ctx.store);
                 pstate.otherLength[i] = mapping.getPrimaryKeyColumns().length;
             } else
                 pstate.sqlValue[i] = val;
@@ -176,13 +184,16 @@ public class CollectionParam
         ParamExpState pstate = (ParamExpState) state;
         for (int i = 0; i < pstate.size; i++) {
             if (pstate.otherLength[i] > 1)
-                sql.appendValue(((Object[]) pstate.sqlValue[i])[index], pstate.getColumn(index), this);
+                sql.appendValue(((Object[]) pstate.sqlValue[i])[index], 
+                        pstate.getColumn(index), this);
             else if (pstate.cols != null)
-                sql.appendValue(pstate.sqlValue[i], pstate.getColumn(index), this);
+                sql.appendValue(pstate.sqlValue[i], pstate.getColumn(index),
+                        this);
             else if (pstate.discValue[i] != null)
                 sql.appendValue(pstate.discValue[i]);
             else
-                sql.appendValue(pstate.sqlValue[i], pstate.getColumn(index), this);
+                sql.appendValue(pstate.sqlValue[i], pstate.getColumn(index),
+                        this);
         }
     }
 }

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/InstanceofExpression.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/InstanceofExpression.java?rev=1197994&r1=1197993&r2=1197994&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/InstanceofExpression.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/InstanceofExpression.java Sat Nov  5 17:17:26 2011
@@ -86,7 +86,8 @@ class InstanceofExpression
             // cache mapping for cast
             MappingRepository repos = ctx.store.getConfiguration().
                 getMappingRepositoryInstance();
-            mapping = repos.getMapping(_cls, false);
+            mapping = repos.getMapping(_cls, ctx.store.getContext().
+                getClassLoader(), false);
 
             // if not looking for a PC, don't bother with indicator
             if (mapping == null || !discrim.hasClassConditions(mapping, true))

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/Param.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/Param.java?rev=1197994&r1=1197993&r2=1197994&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/Param.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/Param.java Sat Nov  5 17:17:26 2011
@@ -81,7 +81,7 @@ public class Param
         Object[] params = ctx.params;
         if (params[_idx] != null && params[_idx] instanceof Class)
             return (ClassMapping) ctx.store.getConfiguration().getMetaDataRepositoryInstance().
-                getMetaData((Class) params[_idx], true);
+                getMetaData((Class) params[_idx], getClass().getClassLoader(), true);
         return null;
     }
 
@@ -126,14 +126,17 @@ public class Param
             pstate.otherLength = other.length(sel, ctx, otherState);
             if (other instanceof Type) {
                 pstate.mapping = ctx.store.getConfiguration().
-                    getMappingRepositoryInstance().getMapping((Class) val, true);
+                    getMappingRepositoryInstance().getMapping((Class) val,
+                        ctx.store.getContext().getClassLoader(), true);
                 pstate.disc = pstate.mapping.getDiscriminator();
                 pstate.discValue = pstate.disc.getValue() != null ? pstate.disc.getValue() : "1";
             }
         } else if (ImplHelper.isManageable(val)) {
             ClassMapping mapping = ctx.store.getConfiguration().
-                    getMappingRepositoryInstance().getMapping(val.getClass(), true);
-            pstate.sqlValue = mapping.toDataStoreValue(val, mapping.getPrimaryKeyColumns(), ctx.store);
+                getMappingRepositoryInstance().getMapping(val.getClass(),
+                ctx.store.getContext().getClassLoader(), true);
+            pstate.sqlValue = mapping.toDataStoreValue(val,
+                mapping.getPrimaryKeyColumns(), ctx.store);
             pstate.otherLength = mapping.getPrimaryKeyColumns().length;
         } else
             pstate.sqlValue = val;

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/ClassMapping.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/ClassMapping.java?rev=1197994&r1=1197993&r2=1197994&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/ClassMapping.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/ClassMapping.java Sat Nov  5 17:17:26 2011
@@ -209,7 +209,8 @@ public class ClassMapping
             try {
                 Class dtype = cls.getDiscriminator().getClass(store, cls, res);
                 if (dtype != cls.getDescribedType())
-                  dcls = cls.getMappingRepository().getMapping(dtype, true); 
+                  dcls = cls.getMappingRepository().getMapping(dtype, 
+                    store.getContext().getClassLoader(), true); 
             } catch (Exception e) {
                 // intentionally ignored
             }

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/FieldMapping.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/FieldMapping.java?rev=1197994&r1=1197993&r2=1197994&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/FieldMapping.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/FieldMapping.java Sat Nov  5 17:17:26 2011
@@ -473,7 +473,8 @@ public class FieldMapping
             // copy embedded template mapping info
             ClassMapping cls = getDefiningMapping();
             if (cls.getEmbeddingMapping() != null) {
-                ClassMapping orig = repos.getMapping(cls.getDescribedType(), true);
+                ClassMapping orig = repos.getMapping(cls.getDescribedType(),
+                    cls.getEnvClassLoader(), true);
                 FieldMapping tmplate = orig.getFieldMapping(getName());
                 if (tmplate != null)
                     copyMappingInfo(tmplate);

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/MappingRepository.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/MappingRepository.java?rev=1197994&r1=1197993&r2=1197994&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/MappingRepository.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/MappingRepository.java Sat Nov  5 17:17:26 2011
@@ -210,14 +210,14 @@ public class MappingRepository extends M
     /**
      * Return the query result mapping for the given name.
      */
-    public QueryResultMapping getQueryResultMapping(Class<?> cls, String name, boolean mustExist) {
+    public QueryResultMapping getQueryResultMapping(Class<?> cls, String name, ClassLoader loader, boolean mustExist) {
         QueryResultMapping res = null;
         if (_locking) {
             synchronized (this) {
-                res = getQueryResultMappingInternal(cls, name);
+                res = getQueryResultMappingInternal(cls, name, loader);
             }
         } else {
-            res = getQueryResultMappingInternal(cls, name);
+            res = getQueryResultMappingInternal(cls, name, loader);
         }
         if (res == null && mustExist)
             throw new MetaDataException(_loc.get("no-query-res", cls, name));
@@ -227,7 +227,7 @@ public class MappingRepository extends M
     /**
      * Returned the query result mapping with the given name.
      */
-    private QueryResultMapping getQueryResultMappingInternal(Class<?> cls, String name) {
+    private QueryResultMapping getQueryResultMappingInternal(Class<?> cls, String name, ClassLoader envLoader) {
         if (name == null)
             return null;
 
@@ -238,7 +238,7 @@ public class MappingRepository extends M
             return res;
 
         // get metadata for class, which will find results in metadata file
-        if (cls != null && getMetaData(cls, false) != null) {
+        if (cls != null && getMetaData(cls, envLoader, false) != null) {
             res = (QueryResultMapping) _results.get(key);
             if (res != null)
                 return res;
@@ -247,9 +247,10 @@ public class MappingRepository extends M
             return null;
 
         if (cls == null)
-            cls = getMetaDataFactory().getResultSetMappingScope(name);
+            cls = getMetaDataFactory()
+                    .getResultSetMappingScope(name, envLoader);
         // not in cache; load
-        getMetaDataFactory().load(cls, MODE_META | MODE_MAPPING);
+        getMetaDataFactory().load(cls, MODE_META | MODE_MAPPING, envLoader);
         return (QueryResultMapping) _results.get(key);
     }
 
@@ -349,20 +350,24 @@ public class MappingRepository extends M
         return getQueryKey(cls, name);
     }
 
-    public ClassMapping getMapping(Class<?> cls, boolean mustExist) {
-        return (ClassMapping) super.getMetaData(cls, mustExist);
+    public ClassMapping getMapping(Class<?> cls, ClassLoader envLoader,
+        boolean mustExist) {
+        return (ClassMapping) super.getMetaData(cls, envLoader, mustExist);
     }
 
     public ClassMapping[] getMappings() {
         return (ClassMapping[]) super.getMetaDatas();
     }
 
-    public ClassMapping getMapping(Object oid, boolean mustExist) {
-        return (ClassMapping) super.getMetaData(oid, mustExist);
+    public ClassMapping getMapping(Object oid, ClassLoader envLoader,
+        boolean mustExist) {
+        return (ClassMapping) super.getMetaData(oid, envLoader, mustExist);
     }
 
-    public ClassMapping[] getImplementorMappings(Class<?> cls, boolean mustExist) {
-        return (ClassMapping[]) super.getImplementorMetaDatas(cls, mustExist);
+    public ClassMapping[] getImplementorMappings(Class<?> cls,
+        ClassLoader envLoader, boolean mustExist) {
+        return (ClassMapping[]) super.getImplementorMetaDatas(cls, envLoader,
+            mustExist);
     }
 
     public void clear() {
@@ -518,7 +523,8 @@ public class MappingRepository extends M
     /**
      * Return the strategy for the given name.
      */
-    protected ClassStrategy instantiateClassStrategy(String name, ClassMapping cls) {
+    protected ClassStrategy instantiateClassStrategy(String name,
+        ClassMapping cls) {
         if (name == null)
             return null;
         if (NoneClassStrategy.ALIAS.equals(name))
@@ -536,17 +542,22 @@ public class MappingRepository extends M
         else if (VerticalClassStrategy.ALIAS.equals(name))
             strat = VerticalClassStrategy.class;
         try {
-            if (strat == null) {
-                strat = JavaTypes.classForName(name, cls, getConfiguration().getClassLoader());
-            }
+            if (strat == null)
+                strat = JavaTypes.classForName(name, cls,
+                    AccessController.doPrivileged(
+                        J2DoPrivHelper.getClassLoaderAction(
+                            ClassStrategy.class)));
             ClassStrategy strategy = 
-                (ClassStrategy) AccessController.doPrivileged(J2DoPrivHelper.newInstanceAction(strat));
-            Configurations.configureInstance(strategy, getConfiguration(),  props);
+                (ClassStrategy) AccessController.doPrivileged(
+                    J2DoPrivHelper.newInstanceAction(strat));
+            Configurations.configureInstance(strategy, getConfiguration(),
+                props);
             return strategy;
         } catch (Exception e) {
             if (e instanceof PrivilegedActionException)
                 e = ((PrivilegedActionException) e).getException();
-            throw new MetaDataException(_loc.get("bad-cls-strategy", cls, name), e);
+            throw new MetaDataException(_loc.get("bad-cls-strategy",
+                cls, name), e);
         }
     }
 
@@ -565,13 +576,16 @@ public class MappingRepository extends M
 
         String props = Configurations.getProperties(name);
         name = Configurations.getClassName(name);
-        OpenJPAConfiguration conf = getConfiguration();
         try {
-            Class<?> c = JavaTypes.classForName(name, field, conf.getClassLoader());
+            Class<?> c = JavaTypes.classForName(name, field,
+                AccessController.doPrivileged(
+                    J2DoPrivHelper.getClassLoaderAction(FieldStrategy.class)));
             if (FieldStrategy.class.isAssignableFrom(c)) {
-                FieldStrategy strat = (FieldStrategy)AccessController.doPrivileged(
+                FieldStrategy strat = (FieldStrategy)
+                    AccessController.doPrivileged(
                         J2DoPrivHelper.newInstanceAction(c));
-                Configurations.configureInstance(strat, conf, props);
+                Configurations.configureInstance(strat, getConfiguration(),
+                    props);
                 return strat;
             }
 
@@ -579,7 +593,8 @@ public class MappingRepository extends M
             if (installHandlers) {
                 ValueHandler vh = (ValueHandler) AccessController.doPrivileged(
                     J2DoPrivHelper.newInstanceAction(c));
-                Configurations.configureInstance(vh, conf, props);
+                Configurations.configureInstance(vh, getConfiguration(),
+                    props);
                 field.setHandler(vh);
             }
             return new HandlerFieldStrategy();
@@ -631,19 +646,25 @@ public class MappingRepository extends M
             strat = ValueMapDiscriminatorStrategy.class;
         else if (SubclassJoinDiscriminatorStrategy.ALIAS.equals(name))
             strat = SubclassJoinDiscriminatorStrategy.class;
-        OpenJPAConfiguration conf = getConfiguration();
+
         try {
             if (strat == null)
-                strat = JavaTypes.classForName(name, discrim.getClassMapping(), conf.getClassLoader());
+                strat = JavaTypes.classForName(name,
+                    discrim.getClassMapping(),
+                    AccessController.doPrivileged(
+                        J2DoPrivHelper.getClassLoaderAction(
+                            DiscriminatorStrategy.class)));
             DiscriminatorStrategy strategy = (DiscriminatorStrategy)
                 AccessController.doPrivileged(
                     J2DoPrivHelper.newInstanceAction(strat));
-            Configurations.configureInstance(strategy, conf, props);
+            Configurations.configureInstance(strategy, getConfiguration(),
+                props);
             return strategy;
         } catch (Exception e) {
             if (e instanceof PrivilegedActionException)
                 e = ((PrivilegedActionException) e).getException();
-            throw new MetaDataException(_loc.get("bad-discrim-strategy", discrim.getClassMapping(), name), e);
+            throw new MetaDataException(_loc.get("bad-discrim-strategy",
+                discrim.getClassMapping(), name), e);
         }
     }
 
@@ -694,7 +715,11 @@ public class MappingRepository extends M
 
         try {
             if (strat == null)
-                strat = JavaTypes.classForName(name, version.getClassMapping(), getConfiguration().getClassLoader());
+                strat = JavaTypes.classForName(name,
+                    version.getClassMapping(),
+                    AccessController.doPrivileged(
+                        J2DoPrivHelper.getClassLoaderAction(
+                            VersionStrategy.class)));
         } catch (Exception e) {
             throw new MetaDataException(_loc.get("bad-version-strategy",
                 version.getClassMapping(), name), e);
@@ -1180,7 +1205,8 @@ public class MappingRepository extends M
     /**
      * Check the given value against mapped strategies.
      */
-    private Object mappedStrategy(ValueMapping val, Class<?> type, boolean adapting) {
+    private Object mappedStrategy(ValueMapping val, Class<?> type,
+        boolean adapting) {
         if (type == null || type == Object.class)
             return null;
 
@@ -1200,7 +1226,13 @@ public class MappingRepository extends M
         String props = Configurations.getProperties(name);
         name = Configurations.getClassName(name);
         try {
-        	return Configurations.newInstance(name, getConfiguration(), props);
+            Class<?> c = JavaTypes.classForName(name, val,
+                AccessController.doPrivileged(
+                    J2DoPrivHelper.getClassLoaderAction(FieldStrategy.class)),false);
+            Object o = AccessController.doPrivileged(
+                J2DoPrivHelper.newInstanceAction(c));
+            Configurations.configureInstance(o, getConfiguration(), props);
+            return o;
         } catch (Exception e) {
             if (e instanceof PrivilegedActionException)
                 e = ((PrivilegedActionException) e).getException();
@@ -1221,9 +1253,15 @@ public class MappingRepository extends M
         String props = Configurations.getProperties(name);
         name = Configurations.getClassName(name);
         try {
-        	Object vh = Configurations.newInstance(name, getConfiguration(), props);
-            if (vh instanceof ValueHandler) {
-                return (ValueHandler) vh;
+            Class<?> c = JavaTypes.classForName(name, val,
+                AccessController.doPrivileged(
+                    J2DoPrivHelper.getClassLoaderAction(ValueHandler.class)),false);
+            if (ValueHandler.class.isAssignableFrom(c)) {
+                ValueHandler vh = (ValueHandler) AccessController.doPrivileged(
+                    J2DoPrivHelper.newInstanceAction(c));
+                Configurations.configureInstance(vh, getConfiguration(),
+                    props);
+                return vh;
             }
             return null; // named field strategy
         } catch (Exception e) {
@@ -1496,7 +1534,8 @@ public class MappingRepository extends M
                 // persistent subclasses may not have been resolved yet.  
                 // run through the persistent types to see if any of them 
                 // or their superclass is a subclass of this class.
-                Collection<Class<?>> classes = loadPersistentTypes(false);
+                Collection<Class<?>> classes = loadPersistentTypes(false, 
+                        mapping.getEnvClassLoader());
                 Class<?> cls;
                 for (Iterator<Class<?>> itr = classes.iterator(); itr.hasNext();) {
                     cls = itr.next();



Mime
View raw message