-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Nicholas,

On 9/17/13 9:59 AM, Nicholas Violi wrote:
> Hello, I'm setting up clustering/replication on Tomcat 7 on my
> local machine, to evaluate it for use with my environment/codebase,
> and sessions don't appear to be replicating. Hopefully I've
> provided enough information below, but please let me know if you
> have any more questions.
> 
> ___Setup___
> 
> I have two identical tomcat servers in sibling directories running
> on different ports. I have httpd listening on two other ports and
> connecting to the two tomcat instances as VirtualHosts. I can
> access and interact with both environments on the configured ports;
> everything is working as expected.
> 
> The tomcat servers have clustering enabled like this, in
> server.xml:

I have to admit that I've never set up Tomcat for clustering, but I
wonder if you'd have better luck configuring with a Unicast membership
model to begin... it seems a bit more straightforward, and has the
added benefit that it will work even if multicast isn't working on
your machine for some reason.

> [...]
> 
> so I know they're aware of each other.

Hmm.

> Finally, when I use the Cluster/Operations MBean in jconsole to try
> to set property "foo" to "bar", jconsole reports "method
> successfully invoked", and the server logs
> 
> Sep 16, 2013 2:30:18 PM
> org.apache.catalina.ha.tcp.SimpleTcpCluster setProperty WARNING:
> Dynamic setProperty(foo,value) has been disabled, please use 
> explicit properties for the element you are trying to identify
> 
> I'm not too worried about that error; mostly included to
> demonstrate that setProperty creates a log statement.
> 
> ___What's not working___
> 
> As far as I can tell, no session information is being replicated in
> my app.
> 
> The tomcat manager only lists sessions started on the server it's 
> monitoring, and not the other one in the cluster.
> 
> I'm under the impression that whenever the app calls 
> HttpSession.setAttribute, that attribute should be replicated to
> the other cluster nodes, and I would expect that some record of
> that would be logged. My app includes this line:
> 
> public static void saveBillingInfo(IPageContext pageContext,
> BillingInfo billingInfo) { 
> pageContext.getSession().setAttribute("billingInfo", billingInfo); 
> //etc... }
> 
> where BillingInfo is a Serializable class containing only one
> field, a HashMap of information about the billing info.
> 
> No log statements are written when this or any other line
> processes, and I don't see any evidence that session information is
> actually being shared.

I believe the DeltaManager will replicate those attributes that have
been set during the whole request. So, instead of sending one message
per call to session.setAttribtue, you'll get one big message with all
of the mutations together. But I agree you should be getting *something*.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJSOGVLAAoJEBzwKT+lPKRY5P4P/0K9f4mTyWKG/MYVP6YOMkRY
XCYLsFJzR4vX8SVSi1gF/ae71qE3cJbkMaXp/Lr6VAJsvJfRepw8aE8lP53N3OUo
CTLMgx1Ud0cGf2iivwWUksRvPzqBg2UKTSG23wp6av0ZhJ5Qhqujh1NPdJ/91tq/
bXBlXx+/XYo6s9dYo6VhOYl+lM3VMusNJwUg6Yjb67onXzZ8LvFwXigMCVIJ2n5T
c+8VJ66Jz5iOiGIWabh7mGKsDbHNsEImATLDhAxk3dyuFyQb9e/hVzXqxZoclb8N
ImwDbWmEgZRew2bpXLUlGWmHt8PDxknF6D3cI7YyAw0bQ66Yw27TnEMdFx/y7yrJ
YGlScXPs17ghzg3WkCHpJ0lt37TOXAdUQMcwHRg0GyiWsdoXrAfLlbkLLUnxPidr
bRBswNurZQ1j4JoVYojWOhwKB3tLdeXHmNNxfjNRfi1cpnjJ1Tdumdg+Iq0LjT//
nM0DciBdFEPw/jM50yR6klg8srMvPhW3HP3i6KXugcoRv4E2/9JvOTwlbJslxZD5
KHrlBTQZegkxPIuu2Bx+QIoAWtU51d2plkTGH+Kq8nGlo9o9YD3DQ0B5r1I+0R9o
pAVyD42bCf/eHDNttcLqRFzXMkJftW4MloL6SuCAeu7L3pyZd42DPiw5E6+qw7uh
5zfC+mgFBJwtDgFJ7+tJ
=0MQ8
-----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