Tuesday 18 September 2012

WCS interview quetions and answers

Following are the questions and answers which I took questions from kingofwcs.blogspot.com site,


  1. 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.

  2. 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.
      
      
  3. 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 transaction
    • Supports :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. 

  4. 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 Persistence
      CMP is used in commerce to interact with the database in commerce.

  5. 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.

  6. which are the different flavours of EJB in wcs ?
    Different flavours of EJB available in WCS are Session Bean and Entity Bean.

  7. 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:
    •  At run time the access bean caches the enterprise bean home object because look ups to the home object are expensive, in terms of time and resource usage.
    • 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. 

  8. 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.

  9. 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.

  10. 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.


  11. What are the different tools available in commerce?
  12. Explain Control command and task command in wcs ?
  13. What is the use of KEYS table in wcs ?
  14. What is the use of CMDREG table in wcs ?
  15. What is a command context.?
  16. How do you instantiate a task command ?
  17. Can we instantiate controller command from another controller command ?
  18. How do you pass data from controller command to task command?
  19. Name five methods available in a Controller command?
  20. what is the use of optCounter field?

  21. Why is struts-config entry required while creating a JSP or a command?
    To map views to corresponding JSP pages .
    
    
  22. 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.
    
    
  23. What does map.mapxmi file contain?
    Mappings from EJB bean attribute definitions to database table schema column definitions .

  24. 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.

  25. 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.   
  26. Which exception is retriable?
    ECSystemException

  27. 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:
    1. Set the retriable properties in the PROPERTIES column of the CMDREG database table, where PROPERTIES 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 and valuen is the value corresponding to the property.
    2. Set an instance property <CommandRegistryRetriableProperty defaultValue="1" /> in the wc-server.xml file.

  28. Functional architecture and Runtime architecture of WCS 6.0/WCS 7.0.

  29. 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. 
    
    
  30. 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.
    
    
  31. Which tool is used for catalog management ?


    Product Management Tool.
    
    
  32. 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.
    
    
    
  33. 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.
    
    
  34. 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.

  35. Explain Organization hirarchy?

  36. What are the identifiers for root and default organizations
  37. what are the features of and the services offered by Member subsystem.
  38. Different tables used for user registraton?
  39. Releationship between the user and organization?
  40. How does the user change from generic to registered via guest.
  41. How to create users?
  42. How to create organization?
  43. What are the different typs of user types?
  44. What are the different types of member groups
  45. What is Range-based customer registration information

  46. 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.
  47. 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
    
    
  48. 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.
  49. 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.
    
    
  50. 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.
  51. When taxes are calculated?


    Taxes are calculated when we proceed to checkout.
  52. 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 directly
    b)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.
  53. 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.
  54. 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.
  55. 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 as allc then an inventory is allocated for the order.


No comments:

Post a Comment

Don't hesitate to ask query