-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Imad,

On 11/1/2009 1:41 AM, Imad Hachem wrote:
> After setting a Tomcat Cluster of 2 nodes on separate machine, Session
> replication is working very fine except one library objects
> (QueryCrypt.jar included in this Web Project) having a Hashmap where we
> store Users SESSION ID.
> 
> After one node shutdown, this Hashmap object is getting empty, note that
> all other session variables have been replicated successfully and
> SESSIONID.jvmRoute still the same which is correct and expected
> behavior.

If that node does /not/ shut down, can you observe that the HashMap is
correctly replicated to the other node? I suspect not.

My guess is that your HashMap has data other than just the SESSIONID,
and that data is not serializable.

Can you run this code against your HashMap in the session?

Map map = (Map)session.getAttribute("whatever");

for(Iterator i=map.entrySet().iterator(); i.hasNext(); )
{
  Map.Entry entry = (Map.Entry)i;

  Object key = entry.getKey();
  Object value = entry.getValue();

  System.out.print(key);
  System.out.print(" (");
  System.out.print((null == key ? "null" : key.getClass().getName()));
  System.out.print(") -> ");

  System.out.print(value);
  System.out.print(" (");
  System.out.print((null == value
                    ? "null"
                    : value.getClass().getName()));
  System.out.println(")");
}

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkru+DcACgkQ9CaO5/Lv0PAfgACbB7Vu9eKS/9rrfhYxqoBcKnv+
ARQAoKFbk70KLHU/dh+0CypVk839V2ku
=Vz81
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to