Mindmajix

IBM WCS Interview Questions

IBM WCS Interview Questions

Q .What are the subsystems you deal in your project?

  • Marketing Subsystem – The Marketing subsystem provides numerous marketing concepts to your site, designed to increase brand awareness, and to attract and retain customers. Components of the marketing subsystem provide functionality to create marketing campaigns, including customer segments and advertising; and e-mail activities.
  • Catalog Subsystem- The catalog subsystem provides online catalog navigation, partitioning, categorization, and associations. In addition, the catalog subsystem includes support for personalized interest lists and custom catalog display pages. The catalog subsystem contains all logic and data relevant to an online catalog, including catalog groups (or categories), catalog entries, and any associations or relationships among them.
  • Member Subsystem- A member can be a user, a group of users (also known as a member group), or an organizational entity (which can be an organization, such as “IBM” or an organizational unit within an organization, such as “Electronic Commerce Division”). Business logic in the Member subsystem provides member registration and profile management services. Other services which are closely related to the Member subsystem include access control, authentication, and session management.
  • Registration information: Registration data for users and organizational entities can be configured to be stored in the WebSphere Commerce database or the directory server. Member group’s data can be stored only in the WebSphere Commerce database. For authentication purposes, a registered user has a unique identifier and a password. If the WebSphere Commerce database is used as registry, the unique identifier is the logon ID. If the directory server is used, the unique identifier can be a distinguished name or a relative distinguished name.
  • Profile management: A Site Administrator manages user and organizational entity profiles and data, including the organizations or organizational units, roles, users, and member groups within a site. In addition, a Buyer Administrator and Seller Administrator can manage users and organizational entities.
  • Access control and authorization: Access control determines what tasks users can perform on specific resources. An access group is a group of members defined specifically for access control purposes. A Site Administrator creates, maintains, and deletes access groups for a site. A Buyer Administrator or a Seller Administrator can also manage access groups for access control policies. Access groups usually group users based on their roles, organizations, and registration status.
  • Security, authentication, and session management:A user can be authenticated against a WebSphere Commerce database or a directory server. WebSphere Commerce supports two challenge types: logon ID and password, and X.509 client certificate. When logon ID and password is used, a user is authenticated against the WebSphere Commerce database or a directory server. When X.509 client certificate is used, the Web server performs the authentication. WebSphere Commerce supports two types of session management: cookie-based and URL rewriting.
  • Trading Subsystem- The trading subsystem in WebSphere Commerce provides the logic, function and data relevant for negotiating the price and quantity of a product or set of products between the buyer and seller organization. The trading subsystem includes auctions, contracts, and Request for Quote (RFQ) components that are used to carry out specific transactions between organizations.
  • Order Management Subsystem- The Order Management subsystem provides shopping carts, order capture, order fulfillment, inventory, and payment function support.

Order management is broadly divided into:

  • Order capture: Order capture provides functionality such as sales quotes and shopping carts and order submission. There are a number of ways to create shop carts and submit orders, as described in the order mechanisms section.
  • Order processing: Order processing is responsible for the overall coordination of inventory allocation, payment processing, releasing the order to fulfillment and tracking order status.
  • Inventory processing: WebSphere Commerce supports two inventory systems: Available to promise (ATP) and non-ATP. The interface to inventory is encapsulated by a single inventory task command, which in turn invokes either ATP or non-ATP task commands.
  • Payment processing: WebSphere Commerce Payments supports the use of payment plug-ins for offline or online payment processing.

Q. Explain Order Management subsystem flow?                                                                                                    

The Order Management subsystem includes all logic and data relevant to placing, processing, and managing orders. The Order Management subsystem also deals with returns.

  • OrderCreate: The order will be created even though there is no orderitems in the cart.
  • OrderItemAdd: When the customer selects the item and click on the add to the cart, then the OrderItemAddCmd will be called. The order state will be pending (P).
  • OrderItemUpdate: This command will be called when the quantity of the item is updated in the shopping cart page. The order state will be pending (P).
  • OrderCalculate: This command will be called when the customer adds the orderitems in the cart. The order state will be pending (P).
  • OrderItemMove: This command merges the current pending order to the previous order when the customer places the order by signing on to the store.
  • OrderPrepare: It basically calculates determines the discount, prices, shipping charges and taxes for the order.
  • OrderProfileUpdate: This command will be called to update the billing and shipping address and ship mode of the customer.
  • OrderProcess: Submits the order.

Here, the order can be blocked for several reasons.

  • This may be due to manual verification of the customer.
  • The order payment has not been captured completely. If the full payment has been captured then the state of the order is complete (C) i.e. payment authorization is complete. When the partial payment has been captured the order state will be (M) i.e. part of the amount has been approved.
  • OrderScheduled: The order is released, if the order is unblocked and fulfills all the requirements. This cmd is invoked by the scheduler. The order state will be released (R). When the order will be released, message will be sent to the LSP for shipment. Once the order gets shipped, the state of the order will be shipped (s) and after that shipment confirmation mail will be sent to the ecommerce. After this the state of the order will be deposited (D).
  • OrderCancel: The order can be cancelled through Customer Sales Representatives, before the order is released to Fulfillment. OrderCancel can cancel orders with an order status of P, X, W, E, A, B, C, M and OrderItem not in R, S, F, and G. Here the order state will be cancelled (X).
  • OrderEdit: This will be called, when the CSR is working with the order. The editor id will be assigned to the order. The order state will be CSR Edit (E). The order can be edit before the releasing the order.

Q. Can you explain about Access Control Policies?

  • Access control policies is the utility provided by WebSphere Commerce, to allow access to the authorized group of user to a perform set of actions on the resources present in the application. There are four main concepts in the ACP.
  • Access: Allowing access to group of authorized users to which policy applies
  • Actions: Actions performed by user on the resources.
  • Resources:  Resources may include business objects (i.e. set of commands, etc)
  • Relationship: Each user can have relationship associated with it. (For e.g. a policy can apply the creator of an order can modify it and it is between the order and the user.)

The basic XML elements of the access control policy files are

  • <Action>:The new action will be loaded on ACACTION table.
  • <ActionGroup>:It is a group of related action and the action groups are stored in ACACTGRP table. Actions are associated with action groups inACACTGRP table.
  • <Attribute>: Attribute is defined in ACATTR table.
  • <ResourceCategory>:  Resource Category is defined in ACRESCGRYtable.
  • <ResourceGroup>: It is a set of resources and defined in ACRESGRPtable.
  • <Relation>: Each resource can have set of relationship associated with it and it is stored in ACRELATIONtable.
  • <RelationGroup>: Relation group are defined in ACRELGRP.
  • <Policy>: Policies are defined in ACPOLICY.
  • <PolicyGroup>: Policy group are defined in ACPOLGRP.

Syntax:

acpload database_name db_username db_pwd  WC_Installdir/xml/policies/acp_file_name.xml


Q. What is acugload?

The acugload is the utility to load the user access group in the appropriate database. This utility will load the <UserGroup> element in the MBRGRPUSG

A member group of type Access Group (-2) is for access control purposes, while a member group of type User Group (-1) is for general use.


Q. What is acpnlsload?

The acpnlsload utility loads the XML files containing the display names and descriptions, into the appropriate databases. To insert or update display names and descriptions for the various policy related elements run the acpnlsload script.

This script loads the following elements:

<Action_nls>, <Attribute_nls>, <ActionGroup_nls>, <ResourceCategory_nls>, <ResourceGroup_nls>, <Relation_nls>, <Policy_nls>, <PolicyGroup_nls>


Q. What is acpextract?

The acpextract utility extracts the access control policy and access group information in the database and generates files that capture the information in XML format. It uses an input filter XML file to specify the data to extract from the database.


Q. Suppose one user login into our site. He selected some of items and he has given the order. After two months, how can you check the status of the Order?

The status of the order can be checked from ORDERS table.

Select STATUS from ORDERS where ORDERS_ID=XXXXXXX;


Q. I want to collect user email id’s whose email id ends with @and particular company name.com. Then how can you give SQL query to Database in WCS?

 The email id of the user can be found from ADDRESS table.  The ADDRESS_ID is the foreign key in the ORDERS table.

So for the particular user, first take the order no and fetch the ADDRESS_ID from the ORDERS table.

Use that ADDRESS_ID to get the email id for the user. Here there can be multiple addresses like permanent address (P) and the temporary address (T) for the same user. So, fetch the address with the STATUS as P.

Select EMAIL1 from ADDRESS where STATUS=’P’ and ADDRESS_ID in (select ADDRESS_ID from ORDERS where ORDERS_ID = XXXXXXX);

If you want to search email ID directly, so run the below query.

Select * from ADDRESS where EMAIL1 like ‘%@abc.com’ OR ‘EMAIL2 like ‘%@abc.com

Where EMAIL1 stands for primary email address.

EMAIL2 stands for secondary email address.


Q. I want to know the particular member _id. Then tell me the relation between MEMBER tables with ORDER table?

The MEMBER_ID is the primary in the MEMBER table and the foreign key in the ORDERS table.


Q. What kind of tables did you use?

In the Order management Flow following tables are used.

ORDERS, XORDERS, ORDERITEMS, XORDERITEMS, OICOMPLIST, XOICOMPLIST, RMA, XRMA,    RMAITEM, XRMAITEM, RMAITEMCMP, XRMAITEMCMP, ORDADJUST, ORDIADJUST, CATENTRY, CATENTREL

In Member Subsystem, following tables are used.

USERS, MEMBER, USERREG, USERSDEMO, USERPROF, ADDRESS, ADDRESSBOOK


Q. What are JSP programming best practices?

Below are the JSP programming best practices:-

  • Use JSTL in place of Java Code.
  • Use commerce specific bean (<wcbase:useBean>)in place of standard bean (<jsp:useBean>)
  • Use commerce specific maps to access request parameters i.e. WCParam&
  • Use StoreErrorDataBeandata bean for error handling. This can be used to display store specific error message in the jsp.
  • Use appropriate includes mechanism.

Static include: Includes the jsp file at the compile time.

<%@ include file=”filename.jspf” %>

Dynamic include: Includes the jsp file at run time, while the request is getting processed.

<c:import url=”filename.jsp”> … </c:import>

<jsp:include  page=”filename.jsp” flush=”true|false”/>

  • Use .jspfextension for the JSP segments. The parent jsp should be with .jsp extension and the included jsp should be with .jspf extension.
  • Use escapeXml attribute to preserve the HTML formatting. By default the value of the escapeXml will be true. When this value is true then the html special characters will be converted to standard entity codes.

For e.g. <c:out value=”${list.productPrice}”/>

Here the value is true by default, if there is any special character in the price, it will display the entity code in the UI

<c:out value=”${list.productPrice}” escapeXml=”true”/>

Here the value is false, if there is any special character in the price, it will display the special characters it is in the UI.

  • Use the POST method instead of GET.

Q. What are different types of promotions?

There are three types of promotions.

Order Promotions

  •   Percentage off
  •   Fixed amount Off
  •   Free gift with purchase

Product Promotions

  •   Fixed amount off per item
  •   Percentage off per item
  •   Fixed amount off for all
  •   Free gift with purchase
  •   Buy X, get one or more items for discount

Shipping Promotions

  •   Free shipping
  •   Discounted shipping for the order using a selected shipping mode.
  •   Discounted shipping for all the item using a selected shipping mode.
  •   Discounted shipping per item using a selected shipping mode.

What are different types of calculation usages used in WCS?

WebSphere Commerce performs all calculations for one calculation usage at a time. The order of calculation usages is stored in the SEQUENCEcolumn of the STENCALUSG database table. The entries in this table are initially populated with information from the language-independent bootstrap file: wcs-bootstrap.xml.

Calculation usage Calculation usage code
Discount -1
Shipping -2
Sales tax -3
Shipping tax -4
Coupon -5
Surcharge -6
Shipping Adjustment -7

Q. On what table promotion codes are stored?

 The promotions that are created through accelerator are stored in PX_PROMOTION

PX_PROMOTION_ID is the primary key

STATUS:  0 means inactive, 1 means active, 2 means mark for deletion, 3 means suspended and 4      means Obsolete.

All the promotion related information that is created from accelerator is stored in PX_PROMOTION table.

PX_PROMOTION contains PX_PROMOTION_ID,

CALCODE and CLCDPROMO are the two tables that can be used to populate the promotion code.

CALCODE consists of CALCODE_ID, STOREENT_ID, CALUSAGE_ID, CODE, DESCRIPTION, START_DATE, END_DATE, and LAST_UPDATE.

CLCDPROMO consists of CALCODE_ID and PX_PROMOTION_ID. NAME, CODE, STOREENT_ID, START_DATE, END_DATE, XML_PARAM, STATUS and etc.

ORDADJUST contains information of the promotions that are applied to the order.

ORDADJDSC consists of ORDADJUST_ID, LANGUAGE_ID, and DESCRIPTION.

ORDIADJUST consists of ORDIADJUST_ID, ORDERITEMS_ID, ORDADJUST_ID and AMOUNT.

ORDPROMOCD consists of ORDERS_ID and CODE

PromotionCodeAddRemoveControllerCmdImpl and PromotionEngineOrderCalculateCmdImpl are used to add the promotion code to the order.


Q.  How do you call a task command from a controller command? And what is the syntax?

Task commands are invoked from controller commands to perform the set of business operations.

SYNTAX:

OrderCalculateCmd cmd = (OrderCalculateCmd) CommandFactory.createCommand (OrderCalculateCmd.class.getName(), getStoreId()))

cmd.setCommandContext (getCommandContext ());

cmd.setRequestProperties (requestProperties);

cmd.execute ();


Q. What is controller commands used in Member Subsystem?

UserRegistrationAddCmd for adding the user. This will insert the data of the user in USERS, USERREG, USERPROF, USERDEMO and ADDRESS table.

UserRegistrationUpdateCmd for updating the user profile.

LogOffCmd for logging out user session.

Customized Controller Commands in GOSP are GOSPNCIMHandShakeCmd used for authenticating the user, by hand shaking with NCIM. This command will search for user authentication token, if the authentication token is available, then the user will be allowed to sign on.

GOSPNCIMUserRegistrationFormCmd used for creating the registration form for the user.


Q. For creating a Controller Command, we register Controller Command into CMDREG table? Is it necessary to register in that table? What is the main purpose to register in CMDREG table?

It is not necessary to enter data in the CMDREG table, but an entry should be made in the struts-config.xml.

The controller command can be registered in the CMDREG table by xml and SQL query.

To register a new controller command, or a new task command, in the CMDREG table, create an entry in the XML file for each new or customized controller or task commands, using the following example of a task command as your guide:

<cmdreg storeent_id=”@storeent_id_1″ interfacename= ” com.ibm.commerce.payment.commands. DoPaymentCmd ” classname = “com.ibm.commerce.payment.commands .DoPaymentMPFCmdImpl”/>

 To register by SQL query

insert into CMDREG (storeent_id, interfacename, description, classname) values  (0,’ com.ibm.commerce.payment.commands. DoPaymentCmd ‘, ‘Payment  commands for all shops’, ‘ com.ibm.commerce.payment.commands .DoPaymentMPFCmdImpl ‘).

If there is no entry for the command in the CMDREG table, then controller will check defaultCommandClassName in the interface.

public interface GOSPShipmentNotificationServiceCmd extends ControllerCommand {

public static final String NAME = GOSPShipmentNotificationServiceCmd.class.getName();

public static final String defaultCommandClassName = GOSPShipmentNotificationServiceCmdImpl .class.getName();

}


Q. Can you list out some of the Controller Commands for giving the promotions to products, which you have been used? And explain the scenario?

Our custom commandGOSPPromotionCodeAddRemoveCmdImpl inherits the out of box command PromotionCodeAddRemoveControllerCmdImpl to apply promotion in the shopping cart page.

Promotion codes are managed by the PromotionCodeManager component of the PromotionEngine. This is a configurable component. The default promotion code manager, WCSPromotionCodeManager, simply records promotion codes entered for an order in the ORDPROMOCD table. All promotion code managers must implement the com.ibm.commerce.marketing.promotion.code.PromotionCodeManager interface.


Q. Can you list out the tag libraries in WCS?

Core tags, sql tags, xml tags and fmt tags.


Q. What is Dyna caching?

Caching improves response time and reduces system load to improve the performance of world-wide web applications.

The Dyna caching service includes:-

  1.  Servlet or JSP result cache, caching the fragments of JSP or whole page.
  2.  Command cache to cache business objects.
  3.  Edge Side Include (ESI) caching to cache, assemble and deliver the dynamic web pages at the edge of enterprise network.
  4.  Invalidation support to ensure that the content of cache is correct. Invalidation can be rule-based, time-based, group-based and programmatic.
  5.  Replication support, to enable cache sharing and replication on multiple servers.
  6.  Disk offload capability, to enable and storing large amount of data, preserve the content in the application server until it is restarted or stopped.

The caching specific behaviour of the WCS is specified in the cachespec.xml present in the Stores.war.

Dyna caching service, places the objects in the cache which is identified by unique cache-id’s (<cache-id> rules) defined in the <cache-entry> elements.

Once the objects with particular cache-id are in the cache, then the subsequent request for the same cache-id is served from the cache.

Cached objects are removed from the cache according to the information provided in the <cache-entry> elements such as <time-out><invalidation> and<priority> elements.

When the available cache memory is full, LRU algorithm removes the cached objects with the lower priority.

The <dependency-id> and <invalidation> elements defines the rule to generate dependency-id’s and the invalidation-id’s, which together specifies certain objects should be removed from the cache after the request is processed.

The <inactivity> element is used to specify a time to live (TTL) value for the cache entry based on the last time that the cache entry was accessed.

Caching strategy

When determining a caching strategy for WebSphere Commerce, the key issues that need to be resolved are:

  • Which pages should be cached
  • Where caching should take place
  • Cache full pages or page fragments
  • How to invalidate the cached data.

Q. Which pages should be cached?

When determining which Web pages should be cached, good candidates for caching are pages that:

  •  Are accessed frequently
  •  Are stable for a period of time
  • Contain a majority of contents that can be reused by a variety of users

The following <cache-entry> example uses a <cache-id> element to cache results created by a JSP and generate a cache ID with two components, “storeId” and “catalogId”, obtained from parameters in the request object:

<cache-entry>

<class>servlet</class>

<name>/ToolTech/. . ./StoreCatalogDisplay.jsp</name>

<property name=”save-attributes”>false</property>

<property name=”store-cookies”>false</property>

<timeout>3600</timeout>

<priority>3</priority>

<cache-id>

<component id=”storeId” type=”parameter”>

<required>true</required>

</component>

<component id=”catalogId” type=”parameter”>

<required>true</required>

</component>

</cache-id>

</cache-entry>


Q. What is the difference between WCParam and param implicit objects?

WCParam is a Websphere Commerce specific implicit object. This allows to access and decrypt the the HTTP request.

Param is a standard JSP implicit object, but it does not guarantee to decrypt the HTTP request.

When you don’t want to encrypt the request parameters, then following configuration needs to be done.

<NonEncryptedParameters display=”false”>

<Parameter name=”storeId” />

<Parameter name=”langId” />

<Parameter name=”catalogId” />

<Parameter name=”categoryId” />

<Parameter name=”productId” />

</NonEncryptedParameters>


Q. What are the different ways of Cache Invalidation?

Invalidating the cache using timeout: This can be done by adding <timeout>10</timeout> in side of <cache-id> element. The timeout value will be in seconds. If the default value is 0, then the cache will not expire.

Using Command invalidation: Command based invalidation means invalidation rules are executed upon the execution of the command that extendsCachableCommandImpl WebSphere Command framework.

The invalidation id’s are constructed based on the fields and methods provided by command.

Invalidating cache using dyna cache API and CACHEIVL table: WebSphere provides DynaCacheInvalidation command which is called by scheduler to process the record in CACHEIVL table.

Invalidating cache using dependency trees: Using dependency id’s the cache can be invalidated.

For e.g.

<dependency-id>KitchenWare

<component id=”” ignore-value=”true” type=”pathinfo”>

<required>true</required>

<value>/CategoryDisplay</value>

</component>

<component id=”parent_category_rn” ignore-value=”true”  type=”parameter”>

<required>true</required>

<value>10003</value>

</component>

</dependency-id>


How to use the dyna cache API not to cache the page?       

Not caching the whole page:

<%@ page import = “com.ibm.commerce.webcontroller. HttpControllerRequestObject” %>

<%@ page import=”javax.servlet.http.HttpServletRequest” %>

<%@ page import=”com.ibm.commerce.server.JSPHelper” %>

<%@ page import=”com.ibm.commerce.command.CommandContext” %>

<%

CommandContext commandContext = (CommandContext)request. getAttribute(“CommandContext”);

HttpControllerRequestObject controllerReq = (HttpControllerRequestObject)commandContext.getRequest();

HttpServletRequest req = controllerReq.getHttpRequest();

JSPHelper.setUncacheable(req,true);

%>

Not caching the fragment of page:

<%@ page import=”com.ibm.websphere.servlet.cache.*” %>

<%                      

              ((ServletCacheResponse)response).setDoNotConsume(true);

%>


Q. What is CommandContext ?

 CommandContext is the interface in WebSphere Commerce, which contains session and user information and set in the Controller command before the execute method is called.


Q. What is use of fmt tag?

fmt tag is used to display the message in locale language.

For e.g <fmt:message key=”TERMSCONDITION122C” bundle=”${termsConditionText}” /></a>


Q. Why JSTLEnvironmentSetup.jspf is included in jsp ?

This file retrieves and prepares the JSP page path, file path and resource bundle path which are used by other JSP’s. The EnvironmentSetup.jsp includes most commonly used attributes such as storeDir, jspDir, includeDir, bundleDir, etc.


Q. How can you do Internationalization in WCS using fmt tag library? Tell me total flow of execution? What are the files to modify for that purpose?

To do Internationlization in WCS, following steps needs to be followed.

Include JSTLEnvironmentSetup.jspf in the jsp. This is required to get the path of the properties files from the environment. The properties files are fetched based on the language id.

Declare the variable name of the bundle in the jsp using the below code.

<fmt:setLocale    value=”${CommandContext.locale}” />

<fmt:setBundle basename=”${sdb.jspStoreDir}/

GOSPNokiaTermsandCondition_NLS” var=”termsConditionText” />

Get the key from the bundle and display in the jsp.

<fmt:message key=”TERMSCONDITION1″  bundle=”${termsConditionText}” />


Q. How can you take shipping address and billing address from customer? Explain?

The shipping and billing address of the customer are stored in the ADDRESS There will be two ADDRESS_IDone is for shipping and other is for billing addresses. The ADDRBOOK_ID is the foreign key in the ADDRESS table. The ADDRESSTYPE will be S for shipping , B for billing and SB for both shipping and billing.

The ORDERS table only contains the ADDRESS_ID of the billing address.


Q. Do you know about .sar files? What’s the use of it?

Store archive file (.sar) is the zip file that contains all necessary assets to create a store or site.


Q. What are the business models in WCS?

Business model provides sample commerce solution which includes organization structure, default roles and access control policies, one or more starter stores, administrator tools and business processes that demonstrate best practices.

  • Consumer Direct: A store that support commerce transactions involving products, services or information directly between businesses and consumers.
  • B2B Direct: A store that supports commerce transactions between two business parties.
  • Hub: A site that enables its customers and partners to access products and services available from business partners or clients of the hub owner.
  • Extended Site:A site that allow the selling organization to provide unique storefronts for different enterprise customers.

Q. What is the difference between DataBean and AccessBean?

DataBean class implements SmartDataBeanuses lazy fetch method. Uses appropriate AccessBean for database access. It is used in JSP.

AccessBean are light-weight simple Java Bean and it is called in the Command, to fetch all the data at once. AccessBean extends AbstractEntityAccessBean.

InputDataBean retrieves data from the URL or view command attributes.


Q. What are the types of Data Bean?

Data Bean is Java Bean that is used in JSP to populate dynamic data.

There are three types of Data Bean,

Smart Data Bean: Smart Data Bean uses lazy fetch method to retrieve data. This type of data bean provides better performance in the situations where not all data from data beans are required. Smart Data bean that requires access to the database should extend access bean from the corresponding entity bean and implement com.ibm.commerce.SmartDataBean interface.

Command Data Bean: Command data bean relies on the command and it is more light weight. The command data bean fetches all the data at once, regardless of whether the JSP requires them or not. Command Data Bean extends corresponding Access Bean and implements com.ibm.commerce.CommandDataBean. interface

Input Data Bean: The Data Bean implementing com.ibm.commerce.InputDataBean interface retrieves data from the URL parameters or attributes set by the View.

When a JSP page is invoked, the generated servlet populates all the attributes that matched in the URL parameters and activates the data bean by passing it to the data bean manager. Then the data bean manager invokes the data bean’s setRequestProperties () method to pass all the attributes set by the view.

The following code is required to activate the data bean.

com.ibm.commerce.beans.DataBeanManager.activate (data_bean, request, response).


Q. How do we use Data Bean in the JSP?

The below code is used to get access to data bean from JSP.

<wcbase:useBean id=”orderDB” classname=”com.gosp.order.beans.GOSPOrderDataBean” scope=”request”>

<c:set value=”${orderId}”  target=”${ orderDB }” property=”orderId”/>

</wcbase:useBean>


Q. Explain about blocking an order.

The order will be blocked by calling task command NotifyBlockCmdor the controller command BlockNotifyCmd. When the order is blocked, the value ofBLOCKEDcolumn in the ORDERS table will be 1 (means the order is blocked).

The record for the blocked orders exists in ORDERBLK table. This table contains the ORDERBLK_IDORDERS_IDBLKRSNCODE_IDRESOLVED (value 0indicates not resolved and 1 indicates resolved).

The BLKRSNCODE and BLKRSNDESC table contains the reason for blocking the order.

The STORBLKRSN table contains the block reason that is available for the store. Here the RESPECTED column is used to make active the reason code (0 means off and 1 means on).


Q. Explain Controller command programming model?

The new controller command should extend com.ibm.commerce.command .ControllerCmdImpl or implements abstract class or interface. While writing new controller command you must implements following methods from abstract class.

isGeneric (): In WCS, there are three types of users, registered users, guest users and generic users. The generic users have common id, and that common id is used to browse to the site.

The isGeneric () methods returns true, if the user is generic and returns for registered users.

isRetriable (): This method returns true, if the command is tried even after the transaction rollback exception or not.

For e.g. the command should be retried even after the transaction rollback exception occurred during the OrderProcess. This command invokes third party payment system for authorization process. It cannot be retried, since authorization cannot be reversed. An example of command that can be retried is ProductDisplay command.

setRequestProperties (com.ibm.commerce.datatype.TypedProperty reqParams) :

This method is invoked by the web controller to pass all the input properties to the controller command. The controller command must parse the input properties and set each individual property explicitly in this method.

validateParameters (): This method is used to validate all the request parameters before processing.

getResources (): This method is used to implement resource level access control. If the resource level action is performed, then it returns vector which contains resource-action pair and if no action is performed then it returns nothing.

performExecute ():  this method is called to perform business logic. Before calling this method, the controller command should invoke the super class performExecute () methods.


Q. What is master catalog?

Master Catalog is a centralized location to manage stores. Everything that is required for the store is present in master catalog. It is a single catalog that contains products, items, relationships and prices that is required for sale in the store.


Q. What is a fulfillment center? Can a store have a multiple fulfillment centers?

Fulfillment centers are used by stores as warehouses for shipping and receiving centers. One store can have multiple fulfillment centers associated with it. Inventory count is maintained separately for each fulfillment centers. Fulfillment includes picking, packing and shipping. Picking is the selection of products from one or more releases from a fulfillment centers, packing is the putting the products in the shipping container and shipping is sending them to customers.


Q. What is the role of helper classes in WCS?

Helper class is a utility class that can be used any where and anytime without prior coding and it reduces code redundancy.

For e.g. BaseJDBCHelper is a JDBC helper class which provides interaction with the database, such as establishing connection with the database, executing the query and closing the connection.


Q. Which method is invoked in the data bean for calling an access bean?

In the populate () method we can write the code to call access bean.


Q. What is Optimistic locking?

Optimistic locking allows you to lower the isolation level that you use in the application, so that fewer locks are placed against the database assets. It allows more application to run concurrently against the same database.


Q. Explain something about scheduler?

A WebSphere Commerce scheduler is a background server that schedules and launches the jobs both at the site level and the store level.

The scheduler polls the SCHACTIVE table to find the jobs scheduled to run.

Following are the value of STATE in SCHACTIVE table

W:  the job is waiting for execution

I:  the job is currently inactive.

IF: the job has run and failed.

R: the job is currently running.

RF: the job is running because of previous attempt failed.

C: the job is finished running.

CF: the job failed to execute successfully.

The scheduler gets the job configuration information from SCHCONFIG table. The job can be run only on WebSphere Commerce server and its clones.

The scheduler logs the status of the job in SCHSTATUS table.

The scheduler can broadcast the jobs on its clones and logs the broadcast job entries in SCHBRDCST table.


Q. Difference between Optimistic locking and pessimistic locking?

Optimistic locking improves the performance of application by reducing the isolation level of the database transactions. If two or more transaction is performing the update operation of the same row, the lock on the row will be acquired by one transaction and remaining transaction will be roll backed.

Pessimistic locking protects the integrity of the database by locking the database assets over the entire duration of the transaction. But this will affect performance of the application that is running multiple transactions at a time and becomes deadlock.


Q. Explain about bundle and kits?

 There are different types of bundle and kits

Prebuilt Kit: A prebuilt kit is a collection of catalog entries that cannot be sold separately. A prebuilt kit has own its price and cannot be changed once it is added to the shopping cart. Inventory of prebuilt kit is independent of its component parts.

Dynamic Kit: A dynamic kit is a group of product that is ordered as a unit. The components of kit cannot be modified in the order, but they are reconfigured by the configurator. The entire configuration must be fulfilled together.

Static Kit:  A static kit is a group of product that is ordered as a unit. The components of kit cannot be modified in the order. The individual components within the order cannot be modified and must be fulfilled together. A static kit will be backorder if any of its components is unavailable. A static kit has no inventory of its own. When the static kit is purchased, the inventory of its component part is lowered.

Bundle: A bundle is a collection of catalog entries which allows customer to buy multiple merchandise with one click. The bundle components can be sold separately.


Q. Explain exception types in  WCS?        

A command can throw two types of exceptions

ECApplicationException:  This exception is thrown; if the error is related to user input and it always fail. When the user enters invalid parameter, this exception is always thrown. When this exception is thrown, the solution controller does not retry the command, even if the command is specified as retirable.

ECSystemException: This exception is thrown if a runtime exception or any WebSphere configuration error occurs. Examples of this exception are Remote Exception, Create Exception or other EJB exceptions. When this exception is thrown, the solution controller retries the command if the command is retirable and the exception was caused by either a database dead lock or database rollback.


Q. What is the purpose of Bootstrap files?

Bootstrap files are XML files which WebSphere Commerce uses during instance creation to populate database tables with information after the schema has been created. Once the data has been loaded, you can see the preloaded information in the table. These files are used to retrieve information about the specific data, such as calculation codes and pricing policies.


Q. What is Search Engine Optimization?

Search Engine Optimization is considered to be the one of the most important channel that can be reached to the customer.

Dynamic Database driven URL such as those generated by WebSphere Commerce contains stop characters like (?, %, &) that can be overwhelm by search engine crawlers. For this reason, search engine limit the URL’s that they index. To overcome this limitation, WebSphere Commerce provides the functionality to help improve the results of search engine indexing.

Crawler is software that is used by search engine to index the page that is available in the website for public.

In WebSphere Commerce, we need to create static URL for the database driven dynamic URL.

For e.g.

The dynamic URL that generates the request as shown below:-

/TopCategoryDisplay?storeId=10500&languageId=-1&categoryId=56723&catalogeId=21789

This dynamic URL contains the stopping characters and it will prevent the indexing by the search engine crawlers.

To avoid this, we need to create a static URL as below:-

/CategoryDisplay_10500_-1_56723_21789

The static URL for all the request can be created by making an entry in the SEOUrlMapper.xml

<mappings>

<pathInfo_mappings separator=”_”>

<pathInfo_mapping name=”CategoryDisplay” requestName=” TopCategoryDisplay”>

<parameter name=”storied” />

<parameter name=”languageId” />

<parameter name=”categoryId” />

<parameter name=”catalogId” />

</pathInfo_mapping>

</pathInfo_mappings>

</mappings>

When search engine analyze the page, it gives more weightage to the page title, page header and the page first sentence of the body.


Q. Explain relationship between CATENTRY and CATENTREL?

The CATENTRY_ID is the foreign key in the ORDERITEMStable and OICOMPLIST

The CATENTRY_ID is the primary key in the CATENTRY table. The relationship of the parent and child CATENTRY_ID can be defined in CATENTREL table.

The CATENTRYTYPE_ID can be Product Bean, Item Bean, Package Bean, Bundle Bean, DynamicKitBean and CatalogEntryBean.

The CATENTDESC contains all the descriptive information for the CATENTRY_ID and the CATENTRY_ID is the primary key in the table.

The LISTPRICE contains the pricing information of the CATENTRY_ID.

The OFFER table contains the OFFER_ID of the CATENTRY_ID.

The OFFERPRICE table contains the offer price of the CATENTRY_ID and the OFFER_ID is the primary key.


Q. Explain something about ATTRIBUTE?

 The ATTRIBUTEtable contains all the attribute information of the CATENTRY_ID. ATTRIBUTE_ID is the primary key. The single CATENTRY_ID can have more than one ATRRIBUTE_ID.

Examples of ATTRIBUTE are like color, Internet browser, FM Radio, Blue Tooth, Warranty, Video Recorder, Music player, etc.

ATTRIBUTE specifies all the features that are available for the CATENTRY_ID.

THE ATTRTYPE table contains attribute type information. ATTRTYPE_ID can be STRING, FLOAT, INTEGER, DATETIME, FREEFROM, BIGINT, and ATTACHMENT.

The ATTRVALUE table contains the STRINGVALUE and the FLOATVALUE description of the ATTRIBUTE_ID based on the store specific LANGUAGE_ID.


Q. Explain something about EMSPOT?

All the Marketing spot that is created in the application will have record in the EMSPOT 

EMSPOT table consists of EMSPOT_ID, STORE_ID, NAME, DESCRIPTION and USUAGETYPE

ESMAPOBJ table consists of mapping between ESMAPOBJ_ID and the OBJECT_ID.


Q. Explain something about INVENTORY?

The INVENTORY contains information like CATENTRY_ID,  STORE_ID, FFMCENTER_ID, QUANTITY and INVENTORYFLAGS.

INVENTORYFLAGS values can be as below:-

1 = noUpdate. The default UpdateInventory task command does not update QUANTITY.
2 = noCheck. The default CheckInventory and UpdateInventory task commands do not check QUANTITY.


Q. Explain something about ADDRESS and ADDRBOOK?

ADDRBOOK table contains the address owned by the member. ADDRESS_ID is the primary key.

ADDRESS table consists of Member own address, friend address and etc.  ADDRESS_ID is the primary key; ADDRESSTYPE can be Shipping S, Billing B or Shipping and Billing SB.


0 Responses on IBM WCS Interview Questions"

Leave a Message

Your email address will not be published. Required fields are marked *

Copy Rights Reserved © Mindmajix.com All rights reserved. Disclaimer.
Course Adviser

Fill your details, course adviser will reach you.