EAServer 5.2 provides in-memory mirror caching for objects saved in the EAServer object cache. This allows objects to be accessed by any server in a cluster, and offers better performance than persistent database caching. For a new server that joins a mirror group or cluster, this feature provides in-memory synchronization. You can use in-memory mirror caching for stateful session components and HTTP sessions.
Mirror caching guarantees that:
If a remote server in the current mirror group is not available, any object can still be retrieved.
Any object in the cache is in sync with the latest copy of the object in the current mirror group, except when the originating server fails before completing a PUT operation on all servers in the group.
A copy of an object being saved in the local cache is updated immediately on all available servers in the current mirror group, except when the originating server fails before completing a PUT operation on all servers in the group.
To use mirror caching feature, the message service must be active. The mirror object cache uses the following message queues to send and receive messages:
<jc> – the object cache queue listens for system messages, such as server shutdown and start-up messages.
<mc> – the mirror cache queue enables a remote server to recover lost data.
Configuring EAServer to use mirror caching for
HTTP sessions
Configure the server in a cluster, and designate mirror pairs:
Chapter 6, “Clusters and Synchronization,” in the EAServer System Administration Guide describes how to configure a cluster.
Chapter 29, “Configuring Persistence Mechanisms,” in the EAServer Programmer’s Guide describes how to configure mirror pairs.
In the Web Application Properties dialog box:
On the General tab, check the Distributable option.
On the Advanced tab, add the com.sybase.jaguar.webapplication.distribute.type property, and set the value to “mirror.”
Configuring EAServer to use mirror caching for
stateful session components
Configure the server in a cluster, and designate mirror pairs:
Chapter 6, “Clusters and Synchronization,” in the EAServer System Administration Guide describes how to configure a cluster.
Chapter 29, “Configuring Persistence Mechanisms,” in the EAServer Programmer’s Guide describes how to configure mirror pairs.
In the Component Properties dialog box, set the following properties before you generate skeletons:
On the Persistence tab, set Persistence to “Java Serialization” and set the Storage Component to “CtsComponents/JavaMirrorStorage.”
On the Transactions tab, select Automatic Failover.
On the Instances tab, unselect Transient.
“Configuring the object cache” in Chapter 4, “EJB CMP Tuning,” in the EAServer Performance and Tuning Guide describes how to enable and configure the object cache. The CtsComponents/ObjectCache component, which previously provided the default implementation of the cache manager, has been replaced by CtsComponents/JavaObjectCache.