Customizing persistence management
The promotion engine's persistence management implementation consists of seven persistence managers for seven types of objects.
About this task
The seven types of objects are:
- Promotions
- Promotion groups
- Promotion policies
- Coupons
- Promotion arguments
- Promotion statistics
- Dynamic attributes
It is unlikely that the persistence management implementation will require customization. However, if required, the steps are the same as customizing either the agenda builder or the sequence builder. The same three step process applies:
Procedure
-
Implement the corresponding interface.
The seven interfaces for the persistence managers include the following:
- com.ibm.commerce.marketing.promotion.PromotionPersitenceManager
- com.ibm.commerce.marketing.promotion.group.PromotionGroupPersitenceManager
- com.ibm.commerce.marketing.promotion.policy.PromotionPolicyPersitenceManager
- com.ibm.commerce.marketing.promotion.coupon.CouponPersitenceManager
- com.ibm.commerce.marketing.promotion.stats.StatsPersitenceManager
- com.ibm.commerce.marketing.promotion.runtime.PromotionArgumentPersitenceManager
-
Modify the promotion engine configuration to register the change.
Locate the PersistenceManagerRegistry element:
<PersistenceManagerRegistry impl= "com.ibm.commerce.marketing.promotion.persistence.PersistenceManagerRegistry"> <PromotionPersistenceManager impl= "com.ibm.commerce.marketing.promotion.PromotionSessionBeanPersistenceManager"> <InitialCacheSize>1024</InitialCacheSize> <MaxCacheSize>8192</MaxCacheSize> </PromotionPersistenceManager> <PromotionPolicyPersistenceManager impl= "com.ibm.commerce.marketing.promotion.policy.PromotionPolicySessionBeanPersistenceManager"> <InitialCacheSize>32</InitialCacheSize> <MaxCacheSize>1024</MaxCacheSize> </PromotionPolicyPersistenceManager> <PromotionGroupPersistenceManager impl= "com.ibm.commerce.marketing.promotion.group.PromotionGroupSessionBeanPersistenceManager"> <InitialCacheSize>32</InitialCacheSize> <MaxCacheSize>1024</MaxCacheSize> </PromotionGroupPersistenceManager> <DynamicAttributePersistenceManager impl= "com.ibm.commerce.marketing.promotion.dynattr.DynamicAttributeSessionBeanPersistenceManager"> <InitialCacheSize>32</InitialCacheSize> <MaxCacheSize>1024</MaxCacheSize> </DynamicAttributePersistenceManager> <PromotionArgumentPersistenceManager impl= "com.ibm.commerce.marketing.promotion.runtime.PromotionArgumentSessionBeanPersistenceManager"> <CouponPersistenceManager impl= "com.ibm.commerce.marketing.promotion.coupon.CouponSessionBeanPersistenceManager"> <StatsPersistenceManager impl= "com.ibm.commerce.marketing.promotion.stats.StatsSessionBeanPersistenceManager> </PersistenceManagerRegistry>
Change the XML element that corresponds to your changed persistence manager.
-
Restart HCL Commerce.
You must restart HCL Commerce for the changes to take effect.