Thursday Jun 11, 2009

2-Node Cluster Memory Replication Issue Resolved

Glassfish V2 Memory ReplicationOne

Glassfish V2 Memory Replication

A number of GlassFish v2 have encountered issues with memory replication for 2-node clusters. This issue has been fixed:

Check out: https://glassfish.dev.java.net/issues/show_bug.cgi?id=7200

This fix is available for support customers in patch1 of GFv2.1.

This issue is also fixed in GFv2.1.1 build 17 available at: GlassFish v2.1.1-b17







 

 

Memory Replication & Multi-threaded Concurrent Access to HttpSessions

Glassfish V2 Memory ReplicationOne

Glassfish V2 Memory Replication

If you are using Memory Replication with GlassFish v2 and your web application involves multiple client threads concurrently accessing the same session id, then you may experience session loss even without any instance failure. The issue here is that our memory replication framework makes use of session versioning. This feature was designed with the more traditional http request/response communication pattern in mind.

For a number of types of applications however, this traditional pattern does not hold. Examples include many Ajax-related frameworks, the use of Frames, etc. Another example is when a page includes many static resources (e.g. jpg's). In these situations, most browsers will optimize the loading of these resources by using multiple parallel connections, each of which is handled by a separate request processing thread. If the application has already established a session then this too will involve more than one thread at a time accessing a single HttpSession.

We have provided a solution for these situations. Use the "relaxVersionSemantics" property in sun-web.xml - this allows the web container to return (for each requesting thread) whatever version of the session is in the active cache regardless of the version number. This is critical when multiple threads are interacting in an essentially non-deterministic fashion with the container.

Here is an example snippet from a sun-web.xml that demonstrates where to add this property:

<sun-web-app>
  <session-config>
    <session-manager persistence-type="replicated">
      <manager-properties>
	<property name="relaxCacheVersionSemantics" value="true"/>
      </manager-properties>
    </session-manager>
  </session-config>

.....
</sun-web-app>






 

 

About

lwhite123

Search

Categories
Archives
« June 2009
SunMonTueWedThuFriSat
 
1
2
3
4
5
6
7
8
9
10
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
    
       
Today