Business Context Service instead of Http session or Cookies
Apart from the Http session or cookies, You can also take a look at using the Business Context Service option which is available for maintaining the information throughout the user activity and invalidating it when the user logs out or the browser is closed.
The context data will be available in tables, CTXMGMT and CTXDATA
To create a Custom Business Context Service -
- Create a new Interface for the custom context by extending the com.ibm.commerce.context.base.Context interface.
- Create a context implementation class that implements the custom interface created before extending the com.ibm.commerce.context.baseimpl.AbstractContextImpl.
- Registering new Business Context by making an entry in businessContext.xml or Create a new businessContext.xml. Register this new businessContext.xml in the wc-server.xml under the BusinessContextService element and then use it.
- You can then push the values from the controller command into the context and then use it across the application.
No comments:
Post a Comment