Details
-
Improvement
-
Status: Closed
-
Critical
-
Resolution: Fixed
-
Java-SDO-1.0
-
None
-
WinXP
-
Patch Available
Description
This improvement is to reduce today's 3 tier registry delegation mechanism to 2 tier's so we won't rely on EPackage.Registry.INSTANCE.
Current design:
The default HelperContext created by using HelperProvider.getDefaultContext() is using the EPackage.Registry.INSTANCE as its package registry that can be delegated to the TCCL's registry. The local HelperContext created by using api.SDOUtil.createHelperContext() is creating a local package registry that can delegate to the builtInModelRegistry that potentially delegates to the EPackage.Registry.INSTANCE.
default HelperContext (EPackage.Registry.INSTANCE/TCCL based)
local HelperContext (local package registry) -delegate> builtInModelRegistry --delegate-> EPackage.Registry.INSTANCE
EMF, SDO runtime models, SDO type models are resided in the EPackage.Registry.INSTANCE
SDO type models (sdoModel.xsd, sdoJava.xsd, sdoXML.xsd, and sdoInternal.xsd) are resided in both builtInModelRegistry and
EPackage.Registry.INSTANCE (registered in the FactoryBase.java)
User models will reside either in the EPackage.Registry.INSTANCE or local package registry
New design:
The builtInModelRegistry will become the end of registry delegation chain that would contain all required EMF and SDO runtime models and type models. The user models will reside at the local registry created for the helper context. If it's the default helper context, the special registry will be the SDOPackageRegistryDelegator that is similar to EPackage.Registry.INSTANCE$Delegator that would look up TCCL's registry and at the end of chain delegates to the builtInModelRegistry. If it's the local HelperContext, a regular Hashmap registry will be used then delegates to the builtInModelRegistry.
default HelperContext (SDOPackageRegistryDelegator/TCCL based) -delegate-> builtInModelRegistry
local HelperContext (local package registry) -delegate-> builtInModelRegistry
EMF, SDO runtime, and SDO type models all reside in the builtInModelRegistry
User models will reside either in the SDOPackageRegistryDelegator(TCCL based) or local package registry