Chapter 22 Creating Web Applications
Web applications can be distributed by deploying them to a Jaguar server cluster that has been augmented with third-party address-redirection software that performs HTTP load-balancing and failover.
If a Web application is distributed and running in a cluster, Jaguar stores session data in a persistent data store to support shared sessions and session failover. However, since session data is bound a single user, you cannot use sessions to store global read-write data. Many applications use ServletContext properties to store global data, but the ServletContext is not global to a distributed application and cannot be used as a shared-memory store. Instead, you must a database (or an EJB entity Bean that connects to a database) to store global data. You can use the Web application's environment properties to store global read-only data.
Jaguar stores session data for distributed Web applications in a remote database that is shared by all servers that run the Web application, connecting through the predefined JDBC connection cache ServletPersistenceCache. Sybase recommends that you configure this cache to connect to an enterprise-grade database server.
The sample ServletPersistenceCache properties must be changed As preconfigured, the ServletPersistenceCache connects to the sample database that is included with the Jaguar sample applications. This sample uses the evaluation version of Adaptive Server Anywhere, which does not allow connections from multiple hosts. You must use another database that allows connections from multiple hosts, and supports the number of connections required by your cluster.
You must define a Jaguar cluster to run a distributed Web application. For more information, see the chapter "Jaguar Clusters and Synchronization" in the Jaguar CTS System Administration Guide.
To distribute a Web application
These steps must be performed in Jaguar Manager, while connected to the primary server for your Jaguar cluster:
If you are storing session data in a database other than Sybase Adaptive Server Enterprise or Adaptive Server Anywhere, you must manually create the table that stores the session data. Create a table named ps_HttpSession with the following schema:
Copyright © 2000 Sybase, Inc. All rights reserved. |