Session management

+

Search Tips   |   Advanced Search

 

Web browsers and e-commerce sites use HTTP to communicate. Since HTTP is a stateless protocol (meaning that each command is executed independently without any knowledge of the commands that came before it), there must be a way to manage sessions between the browser side and the server side.

WebSphere Commerce supports two types of session management:

The administrator can choose to support either only cookie-based session management or both cookie-based and URL rewriting session management. If WebSphere Commerce only supports cookie-based, customers' browsers must be able to accept cookies. If both cookie-based and URL rewriting are selected, WebSphere Commerce first attempts to use cookies to manage sessions; if the customer's browser is set to not accept cookies then URL rewriting is used.

 

Store-level session management

The following diagram illustrates the WebSphere Commerce store level registration infrastructure and user session management in a multi-store environment. Store level registration uses access control roles to associate a customer with a store.

 

Store level registration

Users that shop at a store do not necessarily need to be a member of the store's organization but need to play a shopping role (that is, Registered Customer) in the organization. Users that play an administrative role in an organization are usually associated with the organization by having an ancestral relationship with the organization.

For example, suppose that you have a store, Store A as in the preceding diagram. Also suppose that Sue shops at Store A and Joe is an employee for Store A responsible for the administrative duties of running Store A. To model this scenario from an organizational perspective, Joe should be placed under the Store A's organization but Sue should not. As Sue is not an employee of Store A, Sue is associated with Store A by having her play the shopping role in the Store A organization.

A store determines all of its registered customers by finding all the users that play a shopping role in the store's organization. A user administrator of the store can then proceed to perform store wide activities such as setting up a campaign for all the registered users in a store, or specific actions such as resetting the password of a user registered to its store.

Referring to the previous diagram, consider the following scenario:

  1. Sue, who is a member of the Default Organization, has a shopping role in Reseller A's organization.

  2. Reseller A's parent organization is the Reseller Organization.

  3. Reseller A owns store A.

  4. Sue does not have an organizational role in Reseller B's organization.

  5. Reseller B owns store B.

  6. Sue logs into Store A and shops as usual.

  7. When Sue accesses Store B, Sue is assigned a new session identity for Store B as a guest user.

  8. If she accesses Store A once again, the information in her previous session identity for Store A is used by WebSphere Commerce to manage her session.

  9. The session identity for Store A would be reused for Store B if:

    • Store A and Store B belong to the same organization.

    • Sue has a role defined in both the Reseller A and Reseller B organizations.

 

Related tasks

Use cookies for session management
Use JSP pages for URL rewriting
Use URL rewriting for session management