You designate the Nucleus components that can be shared by site groups through a NucleusComponentShareableType
. This component is created from the class atg.multisite.NucleusComponentShareableType
, which extends atg.multisite.ShareableType
.
To designate Nucleus components as available for sharing:
Create a component that uses or extends
atg.multisite.NucleusComponentShareableType
.Set the
NucleusComponentShareableType
component’spaths
property to the Nucleus components that you wish to be available for sharing.Register the
NucleusComponentShareableType
with theSiteGroupManager
through itsshareableTypes
property.
Core Commerce provides a ShoppingCartShareableType
component. By default, this component’s paths property is set to two installed components:
paths=/atg/commerce/ShoppingCart,\
/atg/commerce/catalog/comparison/ProductList
This setting enables use of a shopping cart and product comparison list as components that are shared by member sites of any given site group. When you configure your multisite environment, you register the ShoppingCartShareableType
component with the SiteGroupManager
by setting its shareableTypes
property as follows:
shareableTypes+=/atg/multisite/ShoppingCartShareableType
After registering a ShoppingCartShareableType
, you can define site groups whose member sites share a ShoppingCart
component and a ProductList
component. For detailed information about defining site groups, see the Multisite Administration Guide.
Making Nucleus Components Shareable
The Oracle Commerce Platform installation provides two Nucleus components that can be shared by a site group:
/atg/commerce/ShoppingCart
/atg/commerce/catalog/comparison/ProductList
If desired, you can make other Nucleus components shareable. Keep in mind that the component’s state might depend on other components or data that must be configured correctly for sharing; otherwise, the component is liable to exhibit unexpected behavior across different sites.
In general, the following guidelines and constraints apply:
If a shared Nucleus component depends on other Nucleus components for state information, these must also be shared.
If a shared Nucleus component depends on repository data for state information, it must be coded so that only sites sharing this component have access to the same repository data.
Note: It might be difficult to ascertain and modify all dependencies for an installed Nucleus component in order to make it shareable; doing so might require major changes to Oracle Commerce Platform code. Repository data dependencies can be especially difficult to determine.