1) 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.
2) 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.
3) Can you explain about Access Control Policies?
A) 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 in ACACTGRP table.
· <Attribute>: Attribute is defined in ACATTR table.
· <ResourceCategory>: Resource Category is defined in ACRESCGRY table.
· <ResourceGroup>: It is a set of resources and defined in ACRESGRP table.
· <Relation>: Each resource can have set of relationship associated with it and it is stored in ACRELATION table.
· <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
4) What is acugload?
A) The acugload is the utility to load the user access group in the appropriate database. This utility will load the <UserGroup> element in the MBRGRPUSGtable.
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.
5) What is acpnlsload?
A) 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>
6) What is acpextract?
A) 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.
7) 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?
A) The status of the order can be checked from ORDERS table.
Select STATUS from ORDERS where ORDERS_ID=XXXXXXX;
8) 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?
A) 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.
9) I want to know the particular member _id. Then tell me the relation between MEMBER tables with ORDER table?
A) The MEMBER_ID is the primary in the MEMBER table and the foreign key in the ORDERS table.
10) What kind of tables did you use?
A) 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
11) What are JSP programming best practices?
A) 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>) activation.
- Use commerce specific maps to access request parameters i.e. WCParam & WCParamValues.
- Use StoreErrorDataBean data 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 .jspf extension 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.
12) What are different types of promotions?
A) 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.
13) What are different types of calculation usages used in WCS?
A) WebSphere Commerce performs all calculations for one calculation usage at a time. The order of calculation usages is stored in the SEQUENCE column 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
|
14) On what table promotion codes are stored?
A) The promotions that are created through accelerator are stored in PX_PROMOTION table.
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.
15) How do you call a task command from a controller command? And what is the syntax?
A) 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 ();
16) What is controller commands used in Member Subsystem?
A) 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.
17) 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?
A) 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();
}
18) Can you list out some of the Controller Commands for giving the promotions to products, which you have been used? And explain the scenario?
A) Our custom command GOSPPromotionCodeAddRemoveCmdImpl 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.
19) Can you list out the tag libraries in WCS?
A) Core tags, sql tags, xml tags and fmt tags.
20) What is Dyna caching?
A) Caching improves response time and reduces system load to improve the performance of world-wide web applications.
The Dyna caching service includes:-
ü Servlet or JSP result cache, caching the fragments of JSP or whole page.
ü Command cache to cache business objects.
ü Edge Side Include (ESI) caching to cache, assemble and deliver the dynamic web pages at the edge of enterprise network.
ü Invalidation support to ensure that the content of cache is correct. Invalidation can be rule-based, time-based, group-based and programmatic.
ü Replication support, to enable cache sharing and replication on multiple servers.
ü 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.
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>
21) What is the difference between WCParam and param implicit objects?
A) 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>
22) What are the different ways of Cache Invalidation?
A)
Ø 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 extends CachableCommandImpl 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>
23) How to use the dyna cache API not to cache the page?
A)
Ø 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);
%>
24) What is CommandContext ?
A) 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.
25) What is use of fmt tag?
A) fmt tag is used to display the message in locale language.
For e.g <fmt:message key="TERMSCONDITION122C" bundle="${termsConditionText}" /></a>
26) Why JSTLEnvironmentSetup.jspf is included in jsp ?
A) 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.
27) 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?
A) 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}" />
28) How can you take shipping address and billing address from customer? Explain?
A) The shipping and billing address of the customer are stored in the ADDRESS table. There will be two ADDRESS_ID one 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.
29) Do you know about .sar files? What’s the use of it?
A) Store archive file (.sar) is the zip file that contains all necessary assets to create a store or site.
30) What are the business models in WCS?
A) 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.
30) What is the difference between DataBean and AccessBean?
A) DataBean class implements SmartDataBean uses 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.
31) What are the types of Data Bean?
A) 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).
32) How do we use Data Bean in the JSP?
A) 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>
33) Explain about blocking an order.
A) The order will be blocked by calling task command NotifyBlockCmd or the controller command BlockNotifyCmd. When the order is blocked, the value of BLOCKED column 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_ID, ORDERS_ID, BLKRSNCODE_ID, RESOLVED (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).
34) Explain Controller command programming model?
A) 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.
35) What is master catalog?
A) 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.
36) What is a fulfillment center? Can a store have a multiple fulfillment centers?
A) 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.
37) What is the role of helper classes in WCS?
A) 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.
38) Which method is invoked in the data bean for calling an access bean?
A) In the populate () method we can write the code to call access bean.
39) What is Optimistic locking?
A) 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.
40) Explain something about scheduler?
A) 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.
41) Difference between Optimistic locking and pessimistic locking?
A) 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.
42) Explain about bundle and kits?
A) 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.
43) Explain exception types in WCS?
A) 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.
44) What is the purpose of Bootstrap files?
A) 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.
45) What is Search Engine Optimization?
A) 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.
46) Explain relationship between CATENTRY and CATENTREL?
A) The CATENTRY_ID is the foreign key in the ORDERITEMS table and OICOMPLIST table.
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.
47) Explain something about ATTRIBUTE?
A) The ATTRIBUTE table 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.
48) Explain something about EMSPOT?
A) All the Marketing spot that is created in the application will have record in the EMSPOT table.
EMSPOT table consists of EMSPOT_ID, STORE_ID, NAME, DESCRIPTION and USUAGETYPE
ESMAPOBJ table consists of mapping between ESMAPOBJ_ID and the OBJECT_ID.
49) Explain something about INVENTORY?
A) 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.
2 = noCheck. The default CheckInventory and UpdateInventory task commands do not check QUANTITY.
50) Explain something about ADDRESS and ADDRBOOK?
A) 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.
51) Explain SHIPMODE, SHIPINFO, SHPMODEDSC, SHPMODCLCD, SHPARRANGE, and SHPJCRRULE.
A) SHIPMODE – Each row of this table represents the shipmode for store entity.
SHIPMODE_ID, STOREENT_ID, CODE, CARRIER and MARKFORDELETE (0 by default)
SHPARRANGE- Each row of this table represents a ShippingArrangement, indicating that a FulfillmentCenter can ship products on behalf of a Store using a ShippingMode. SHPARRANGE_ID, STORE_ID, FFMCENTER_ID, SHIPMODE_ID.
SHIPMODEDSC-Each row contains the language dependent description of the ship mode.
- Explain the access control policy?What is the purpose of access control policy?
There are two types of access control, both of which are policy-based: command-level access control and resource-level access control.
- Command-level access control determines whether the user is allowed to execute the particular command within the store you have specified.
- Resource-level access control policy could be applied to determine if the user can access the resource in question.
Access control in a WebSphere Commerce application is composed of the following elements: users, actions, resources, and relationships.
- Users are the people that use the system. For access control purposes, users must be grouped into relevant access groups.
- Actions are the activities that users can perform on the resource. For access control purposes, actions must also be grouped into relevant action groups. For example, a common action used in a store is a view. A view is invoked to display a store page to customers. The views used in your store must be declared as actions and assigned to an action group before they can be accessed.
- Resources are the entities that are protected. For example, if the action is a view, the resource to be protected is the command that invoked the view, for example com.ibm.commerce.command.ViewCommand.
- Relationships are the relationship between the user and the resource. Access control policies may require that a relationship between the user and the resource be satisfied. For example, users may only be allowed to display the orders that they have created.
- Explain the Dynacache?
Now a days the requirement is changed that caching should be implemented for the content that changes frequently.The bright solution for this is DynaCache system which is provided by IBM Websphere Application server.- Dyna Cache is to be configured to catch some objects and later based on some matching rules Dyna cache retrive those objects from the cache.
Caching rules are specified in Cachespec.xml file.
- What the EJB transaction parameters?Possible values for
TRANSATTRIBUTE
are:NotSupported:Bean cannot be involved in a transaction. If the client has started a transaction, the existing transaction is suspended until the bean's method has completed.
Required
:Bean must always run within a transactionSupports
:If the client has started a transaction, the bean joins the transaction.RequiresNew:Bean always starts a new transaction.
Mandatory:The client must start a transaction when the bean is invoked.
Never
:If the client has started a transaction, the bean throws an exception.
- which are different types of entity beans n which one is used in commerce?
There are 2 types of entity beans available namely- BMP-Bean Managed Persistence
- CMP -Container Managed PersistenceCMP is used in commerce to interact with the database in commerce.
- Which are the different types of databeans. What is commonly used in commerce.when do we use it?
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.There are two types of data beans: smart data beans and command data beans.- A smart data bean uses a lazy fetch method to retrieve its own data. This type of data bean can provide better performance in situations where not all data from the access bean is required, since it retrieves data only as required. Smart data beans that require access to the database should extend from the access bean for the corresponding entity bean and implement thecom.ibm.commerce.SmartDataBean interface. When database access is not required, the smart data bean should extend the SmartDataBeanImpl class.
- A command data bean relies on a command to retrieve its data and is a more lightweight data bean. The command retrieves all attributes for the data bean at once, regardless of whether the JSP page requires them. As a result, for JSP pages that use only a selection of attributes from the data bean, a command data bean may be costly in terms of performance time. Command data beans can also extend from their corresponding access beans and implement thecom.ibm.commerce.CommandDataBean interface.
SmartDataBean is commonly used in wcs.We use command databean only when using Command databean is impractical. - which are the different flavours of EJB in wcs ?
Different flavours of EJB available in WCS are Session Bean and Entity Bean. - What are acessbeans? What is the advantage of accessbean?WebSphere Commerce commands interact with access beans rather than directly with entity beans. Access beans provide a simpler interface to clients, caching of the home object, and reduced call traffic to the enterprise bean.Access beans behave like Java beans, and hide all enterprise bean-specific programming interfaces from the client, like the JNDI, home and remote interfaces.Advantage of accessbean:
- The access bean implements a copyHelper object that reduces the number of calls to the enterprise bean when commands get and set enterprise bean attributes. Only a single call to the enterprise bean is required when reading or writing multiple enterprise bean attributes.
- State one diff between 6.0 and 7.0 commerce version?
Social Commerce Support,Coshoping provision, rich look and feel,starter stores optimized for mobile devices. - what is optimistic locking?
WebSphere Commerce uses an optimistic locking scheme that allows the database transaction isolation level to be lowered from repeatable read to read committed. Using that scheme, database rows not normally accessed concurrently are not locked with an intent to update when they are read. Instead, when the update is eventually made, the row is checked to make sure it has not been updated concurrently since it was read. If it has been updated concurrently, then the transaction is rolled back and the command may be restarted from the beginning in a new transaction, if appropriate. In this scheme, performance is improved when concurrent updates do not normally occur, because the relatively expensive process of obtaining the database locks with intent to update is avoided. On the other hand, for those operations where concurrent updates are more likely to occur, pessimistic locking, whereby intent to update locks are obtained when the row is read, continues to be used, thus avoiding the more expensive process of rolling back and re-starting from the beginning in a new transaction. - Which are the different subsystems in commerce?
There are mainly 6 subsystems available in WCS namely:1)Catalog 2)Member 3)Order 4)Marketing 5)Merchandising 6)Trading. - What are the different tools available in commerce?
- Explain Control command and task command in wcs ?
- What is the use of KEYS table in wcs ?
- What is the use of CMDREG table in wcs ?
- What is a command context.?
- How do you instantiate a task command ?
- Can we instantiate controller command from another controller command ?
- How do you pass data from controller command to task command?
- Name five methods available in a Controller command?
- what is the use of optCounter field?
- Why is struts-config entry required while creating a JSP or a command?
To map views to corresponding JSP pages .
- What is the use of commitCopyHelper() and refreshCopyHelper()?
commitCopyHelper():Instead of using the remote interface, CopyHelper Access Beans exist that contain getters and setters for CMP fields that do not exist on the remote interface. The methods within the CopyHelper Access Beans write data to a hash table that in turn updates the database when commitCopyHelper() is called. The hash table can record multiple database changes then update the database in one transaction, unlike the remote methods which require one transaction per change.
RefreshCopyHelper():which does the reverse function of commitCopyHelper(). The method refreshCopyHelper() writes to the hash table from the database.
- What does map.mapxmi file contain?
Mappings from EJB bean attribute definitions to database table schema column definitions . - List the different business models of wcs ?
The different business models of wcs are:
a)B2C b)B2B c)Demand chain d)Supply chain e)Value chain and f)Extended sites. - Which are different types of Exceptions used in commerce?
ECApplicationException
- This exception is thrown if the error is related to user input and will always fail. For example, when a user enters an invalid parameter, an ECApplicationException is thrown. When this exception is thrown, the solution controller does not retry the command, even if it is specified as a retriable command.
- ECSystemException
- This exception is thrown if a runtime exception or a WebSphere Commerce configuration error is detected. Examples of this type of exception include create exceptions, remote exceptions, and other EJB exceptions. When this type of exception is thrown, the solution controller retries the command if the command is retriable and the exception was caused by either a database deadlock or database rollback.
- Which exception is retriable?
ECSystemException - How can we make a command retriable?
A retriable command is a controller command that can re-execute itself after encountering a system-level exception during the command execution.
To make an existing controller command retriable, must perform one of the following steps:- Set the retriable properties in the PROPERTIES column of the CMDREG database table, wherePROPERTIES is the default properties associated with this command. The properties are in the property1=value1&property2=value2 form, where propertyn is the name of the property andvaluen is the value corresponding to the property.
- Set an instance property <CommandRegistryRetriableProperty defaultValue="1" /> in the wc-server.xml file.
- Functional architecture and Runtime architecture of WCS 6.0/WCS 7.0.
- Difference between mastercatalog and sales catalog?
There are two types of catalogs in a WebSphere Commerce system: master and sales. While a master catalog is the central location to manage all your store's merchandise and services, a sales catalog is a subset of the merchandise and services found in the master catalog.Every store in the WebSphere Commerce system must have a master catalog. Only one master catalog can exist at a time, and multiple stores can share a master catalog. However, you can create one or more sales catalogs for customer display purposes. A sales catalog has a flexible display structure that allows you to associate products to more than one category, to suit the requirements of your store.
- Explain the SKU,partnumber?
Every product has a unique identification number when it is manufatured i.e.,PartNumber.SKU is a store keeping unit which is a number when a products are orderable.
- Which tool is used for catalog management ?
Product Management Tool.
- what is the difference between product and item?
Products: A product acts as template for a group of items(or SKUs) that exhibits the same attributes.Items: An item is a tangible unit of merchandise that has a specific name, part number and price.
- What is attribute dictionary?
An attribute dictionary is a set of common attributes and attribute values that can be reused by multiple products. The attribute management tool in Management Center provides business users the ability to create,update, assign, and manage product attributes.
- Difference between Static Kit and Packages
Packages: A package is an atomic collection of catalog entries. It is that all the items in a package can sold together but individual selling of items in a package is not allowed.Static Kits: A static kit is a group of products that are ordered as a unit.A static kit will back order if any of its components are unavailable.A static kit is first created as a package then configured by an administrator. - Explain Organization hirarchy?
- What are the identifiers for root and default organizations
- what are the features of and the services offered by Member subsystem.
- Different tables used for user registraton?
- Releationship between the user and organization?
- How does the user change from generic to registered via guest.
- How to create users?
- How to create organization?
- What are the different typs of user types?
- What are the different types of member groups
- What is Range-based customer registration information
- What is calculation usage?
Calculation usage consists of types of taxes that can be attached to an order item.By default we have 7 types of taxes like shipping, discount, shipping tax, etc.All those can be found in CALUSAGE database table. - Different types of Charges?
There are 7 types of charges, those are:a)discount b)shipping c)sales tax d)shipping tax e)coupon f)surcharge g)shipping adjustment
- Wkat is fulfillment center?
Stores use fulfillment centers as both inventory warehouses and shipping and receiving centers. One store can have one or many fulfillment centers.
- What is calcode?
While attachment is defined outside of a calculation code, the following properties are defined as part of a calculation code: A calculation usage. This specifies the calculation type for which a calculation code can be used. Calculation usages are covered in Calculation usages. Calculation methods that are used to qualify, calculate, and apply the calculation code.A flag indicating if a calculation code must be qualified or not.A flag indicating if the calculation code is active, inactive, or marked for deletion.The method of grouping order items for calculations.A sequence number that is used to determine the order of calculations when multiple calculation codes of the same calculation usage apply to an order item.A time range during which the calculation code is in effect.These properties are defined in the CALCODE database table. - What are calmethods?
Calculation methods use the information that is part of calculation usages, calculation codes, and calculation scales to determine monetary amounts for order items. Calculation methods are categorized by the task that they perform within the calculation framework and the part of the calculation framework to which the calculation method belongs.
- When taxes are calculated?
Taxes are calculated when we proceed to checkout.
- How many ways calcode can be attached?
3 ways calcode can be attached.a)Direct attachment: Here, we can attach a calcode to order or orderitem directlyb)Indirect attachment: Here, we attach a calcode to catalog or catalog group. Hence, every item in a particular catalog or catalog group is indirectly attached to calcode that is attached to that catalog or catalog group.c)Default attachment: Here, we implicitly attach a calcode specifying a calcode to an orderitem in STENCALUSG table. - How many types of inventory exists?
There are 4 types of inventory exists in wcs namely:a)ATP b)Non ATP c)External Inventory d)No Inventory.
- Whar are the different types of order capture?
WebSphere Commerce supports several mechanisms for submitting orders. A customer or Customer Service Representative can submit an order using any of the following methods:a)Requisition lists b)Wish lists c)Shopping carts d)Scheduled orders are recurring orders e)Quick orders f)Copied orders g)Sales quotes.
- How to know whether an inventory is allocated for the order or not?
By checking in to OrderItems table InventoryStatus column.If that column has an value asallc then an inventory is allocated for the order.
No comments:
Post a Comment