On Thu, Sep 19, 2013 at 9:03 AM, Daniel Mikusa <dmik...@gopivotal.com>wrote:

> Here's what I've been using:
>
>
> WEB-INF/web.xml:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee";
>     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>     xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
> http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";>
>
>     <distributable/>
>
> </web-app>
>
>
> index.jsp:
>
> <%
>     Integer count = (Integer) session.getAttribute("counter");
>     if (count == null) {
>         count = 0;
>         session.setAttribute("counter", 0);
>     } else {
>         session.setAttribute("counter", count + 1);
>     }
> %>
> <html>
> <head>
>     <title>Index</title>
> </head>
> <body>
>     <h2>Session [<%= session.getId() %>]</h2>
>     <p>Current count is <%= count %></p>
> </body>
> </html>
>
>
> It's crude, but effective for testing session replication.
>
Hi, and sorry for the silence; I had a few other things take priority over
this last week, but I've found some time today to test your counter app.

So I'm now cutting out both httpd and my complicated webapp, and still see
no replication of session variables, and nothing in the logs regarding
clustering besides startup/shutdown of nodes in the cluster. Both instances
of the counter app show the same session ID, and both increment (correctly)
independent of each other, but they are not sharing the session variable :(

One possible clue as to what's going on is this log message, that's been
bothering me:

> FINE: Received a failure detector
> packet:ClusterData[src=org.apache.catalina.tribes.membership.MemberImpl[tcp://{192,
> 168, 1, 240}:4000,{192, 168, 1, 240},4000, alive=1379968430807,
> securePort=-1, UDP Port=-1, id={81 35 97 0 -37 63 71 -104 -102 28 115 6 -51
> -24 -24 99 }, payload={}, command={}, domain={}, ]; id={-101 -57 -98 104
> -103 31 66 113 -85 -84 -80 -86 14 -2 52 -31 }; sent=2013-09-23 16:33:50.81]


Other than that I'm at a loss on where to go; any suggestions are welcome.

Thanks,
Nick

Reply via email to