web server - Borland Technical Publications

web server - Borland Technical Publications web server - Borland Technical Publications

techpubs.borland.com
from techpubs.borland.com More from this publisher
12.11.2014 Views

Chapter 6 6Java Session Service (JSS) Chapter configuration The Java Session Service (JSS) is a service that stores information pertaining to a specific user session. JSS is used to store session information for recovery in case of container failure. Borland provides an Interface Definition Language (IDL) interface for the use of JSS. Two implementations are bundled, one using DataExpress and another with any JDBC capable database. JSS provides a mechanism to easily store session information in a database. For example, in a shopping cart scenario, information about your session (the number of items in the shopping cart, and such) is stored by the JSS. So, if a session is interrupted by a Borland web container unexpectedly going down, the session information is recoverable by another Borland web container instance through the JSS. The JSS must be running on the local network. Any web container (within the cluster configuration) finds the JSS and connects to it and continues session management. For more information about the Borland web container, go to Chapter 4, “Web components.” Session management with JSS The following diagrams show typical landscapes of web components and how session information is managed by the JSS. The JSS session management is completely transparent to the client. In the “JSS Management with a Centralized JSS and Two Web Containers” diagram, there are four virtual machines: ■ ■ ■ The first machine hosts the Apache web server, two other machines contain an instance of the Borland web container, and the fourth machine hosts the JSS and relational database (JDataStore or a JDBC datasource). Chapter 6: Java Session Service (JSS) configuration 57

Session management with JSS If an interruption occurs between the Apache web server (Machine 1) which is passing a client request to the first web container instance (Machine 2), then the second web container instance (Machine 3) can continue processing the client request by retrieving the session information from the JSS (Machine 4). The items in the Shopping Cart are retained and the client request continues to be processed. Figure 6.1 JSS Management with a Centralized JSS and Two Web Containers In the “JSS Management with Two Web Containers and a Centralized Backend Datastore” diagram, are the following four virtual machines: ■ ■ ■ The first machine hosts the Apache web server, the two other machines contain an instance of the Borland web container as well as each hosting the JSS, and the fourth machine hosts the relational database (JDataStore or a JDBC datasource). If an interruption occurs between the Apache web server (Machine 1) which is passing a client request to the first web container instance (Machine 2), then the second web container instance (Machine 3) can continue processing the client request by retrieving the session information from the JSS (Machine 4). The items in the Shopping Cart are retained and the client request continues to be processed. 58 BES Developer’s Guide

Chapter<br />

6<br />

6Java Session Service (JSS)<br />

Chapter<br />

configuration<br />

The Java Session Service (JSS) is a service that stores information pertaining to a<br />

specific user session. JSS is used to store session information for recovery in case of<br />

container failure.<br />

<strong>Borland</strong> provides an Interface Definition Language (IDL) interface for the use of JSS.<br />

Two implementations are bundled, one using DataExpress and another with any JDBC<br />

capable database.<br />

JSS provides a mechanism to easily store session information in a database. For<br />

example, in a shopping cart scenario, information about your session (the number of<br />

items in the shopping cart, and such) is stored by the JSS. So, if a session is<br />

interrupted by a <strong>Borland</strong> <strong>web</strong> container unexpectedly going down, the session<br />

information is recoverable by another <strong>Borland</strong> <strong>web</strong> container instance through the JSS.<br />

The JSS must be running on the local network. Any <strong>web</strong> container (within the cluster<br />

configuration) finds the JSS and connects to it and continues session management.<br />

For more information about the <strong>Borland</strong> <strong>web</strong> container, go to Chapter 4, “Web<br />

components.”<br />

Session management with JSS<br />

The following diagrams show typical landscapes of <strong>web</strong> components and how session<br />

information is managed by the JSS. The JSS session management is completely<br />

transparent to the client.<br />

In the “JSS Management with a Centralized JSS and Two Web Containers” diagram,<br />

there are four virtual machines:<br />

■<br />

■<br />

■<br />

The first machine hosts the Apache <strong>web</strong> <strong>server</strong>,<br />

two other machines contain an instance of the <strong>Borland</strong> <strong>web</strong> container,<br />

and the fourth machine hosts the JSS and relational database (JDataStore or a<br />

JDBC datasource).<br />

Chapter 6: Java Session Service (JSS) configuration 57

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!