Dynamo Application Framework includes a class that lets you use an alias for Nucleus components. This class, atg.nucleus.GenericReference, allows you to use a name of a Nucleus component to reference another component instance in Nucleus. This is useful if you want systems to have separate names, but be backed by the same service instance. Later, if necessary, someone can change the configuration of the referencing service to have their own instance. All other systems that utilize the original Nucleus name do not need to be reconfigured. Note that the aliased component must have global scope.

To use the GenericReference class:

For example, suppose you use a customized pricing model for each customer in your application. The pricing model is not actually a separate component, but is contained within the profile repository. You can refer to the pricing model as if it were a separate component with a Nucleus address like /atg/commerce/pricing/PricingModels. The Nucleus component at /atg/commerce/pricing/PricingModels is a GenericReference whose componentPath points to the profile repository like this:

componentPath=/atg/userprofiling/ProfileAdapterRepository

If in the future you decide to move pricing models out of the user repository and set them up as a separate component, you would just need to change the configuration of /atg/commerce/pricing/PricingModels to use the class of the new separate component instead of the atg.nucleus.GenericReference.

 
loading table of contents...