Wednesday, January 16, 2013

Commerce Command Framework Important points to Remember

IBM WebSphere Commerce server commands follows specific design pattern that is  interface and implementation class. And every command will follow WebSphere command framework which implements command design pattern. It will do two main operations while implementing the command class.
  • The ability to invoke an access control policy manager that determines if the user is allowed to invoke the command.
  • The ability to execute a different command implementation for different stores, based upon the store identifier.
There are two ways to implement the command class.
  • By declaring the implementation class in the interface.
Ex :String defaultCommandClassName = "com.ibm.commerce.member.commands.UserRegistrationCmdImpl";
  • By declaring in the WebSphere Commerce command registry.
CMDREG table and its importance:

The precedence is given for the command registry. If nothing mentioned in the command registry then it will check for the default implementation mentioned int he interface.

If we have a extended sites model and if a command has two separate implementations for different sites,  then based on the storeId given in the CMDREG table the implementation class invokes.

If the command always use the same implementation its not necessary to mention it in the CMDREG table, rather we can define it in the interface as default implementation. But we cannot pass default parameters in interface declaration.

Read Full Info about Command framework






1 comment:

  1. Your blog is very useful. i got more than information about word press. its really wonderful blog. pls added more than tips. Nice sharing. i'm working in a cms in chennai.Here providing very low price cms , responsive webdesign and ERP. you have any more than information kindly make me call this number 044-42127512 or send your mail info@excelanto.com.

    ReplyDelete