Friday, August 19, 2011

All about Registry in WCS

How to create your own Registry
 -Create a classfile which implements
 --public abstract interface Registry
 --public abstract void initialize()
 --public abstract void refresh()
What are the methods required in side the Registry
 -initialize() --call refresh method
 -refresh() --load the values

what is the  registry Entry in side the  wc-server.xml ?
 <registry  name="BipinRegistry" regClassName="" />

How to invoke the registry from controller command
 -MyNewRegistry myregsty= MyNewRegistry (RegistryManager.singleton().getRegistry(MyNewRegistryname ));

When registry will load
 -While starting the server ,registry will initialize

If the data in the tables associated with a registry is changed, you will need to refresh that registry for the change to take effect. For example, if a new entry is added to the Struts Configuring, the UrlRegistry has to be refreshed. Otherwise, the WebSphere Commerce runtime environment will not recognize the new URL.

Most commonly using registry: URLRegistry, Promotion Regisry