One of the defining features of RESTful services is that they are stateless, meaning that a client’s state is not kept on the server. This allows each request to be treated independently and the Web services do not need to maintain the previous interactions from clients. Statelessness necessitates that each request from a client to a server to contain all of the information necessary to understand the request.

Oracle Core Commerce passes state data to the client in the HTTP response and requires the client to pass the state data back to the server on the next request. There are two main components that pass data during a session.

By default, the framework is configured to be stateful. However, the framework contains a stateless configuration layer. When a server runs with this layer, both the session and the window scope are remapped to a request scope, indicating that the server is no longer storing state across the session. You can pass session state data to a client as part of a response header and body. You can also allow the client to pass that data back in with a request and have it transformed back into state information available for that request. The public/v1 API provides support for passing the profile and cart state information back and forth to the client. The profile data is passed using headers. The cart can grow to be very large, and is therefore passed as extra data in the response body.

Note: When configuring statelessness, your environment should not contain any shareable types. For information on shareable types, refer to the Multisite Administration Guide.

Important: When working with stateless environments, the best performance can be obtained by routing all service requests from a session to the same server, ensuring session affinity. Additionally, data volume for service calls and responses increases when your environment is set to use statelessness. As such, it is best to increase the available network bandwidth with the understanding that your performance results may differ depending on the configuration of your environment.


Copyright © 1997, 2017 Oracle and/or its affiliates. All rights reserved. Legal Notices