Thursday 4 October 2012

Details about Data beans in WCS.


Data Bean :

A data bean is a Java bean that is used within a JSP page to provide dynamic content. A data bean normally provides a simple representation of a WebSphere Commerce entity bean. The data bean encapsulates properties that can be retrieved from or set within the entity bean. As such, the data bean simplifies the task of incorporating dynamic data into JSP pages.

A data bean is activated in one of the following ways:
  • by means of the wcbase:useBean tag (recommended)
  • by means of the following call:
com.ibm.commerce.beans.DataBeanManager.activate(data_bean, request, response)
where data_bean is the data bean to be activated, request is an HTTPServletRequest object, and response is an HTTPServletResponse object.

Types of data beans :

A data bean is a Java bean that is mainly used to provide dynamic data in JSP pages. There are two types of data beans:

  1.       Smart Data Bean.
  2.       Command Data Bean.
  • Smart data beans :
  • A smart data bean uses a lazy fetch method to retrieve its own data.
  • Smart data beans that require access to the database should extend from the access bean for the corresponding entity bean and implement the com.ibm.commerce.SmartDataBean interface.
  • For example, the OrderItemDataBean data bean extends the OrderItemAccessBean access bean, which corresponds to the OrderItem entity bean.
  • Some smart data beans do not require database access. At this case “When database access is not required, the smart data bean should extend the SmartDataBeanImpl class”. 
   Command data bean :
  • A command data bean relies on a command to retrieve its data and is a more lightweight data bean.
  • Command data beans can also extend from their corresponding access beans and implement the com.ibm.commerce.CommandDataBean interface.

Solr settings and full indexing (Attribute task update)

SOLR is mainly used for : Indexing Querying    SOLR is a product of apache and having the inbuilt server named jeety. Mainly the ...