2 Replies Latest reply on May 21, 2009 9:43 AM by Suresh Reddy

    DWR issues in cluster....

    Suresh Reddy Newbie

      Hi All,

      I have 2 node Jboss (version: 4.2.3GA) cluster setup with session stickiness enabled; apache/mod_jk is front-end loadbalancer.

      My application is using dwr for ajax calls at the web layer; when I deploy this on standalone node and access... it works fine.

      When I deploy it on cluster... the session replication is working fine (i.e., httpsession data is properly replicated) but, the call to invoke dwr controller is not triggered on fail-over.

      When I print the URL: it is ".htm" as per the definition dwr controller should trigger "DispatcherServlet" hence invoke "DashBoardController" but, no action after URL.

      web.xml entry:




      I have home page configured thru DWR controller...
      entry in the dwr controller xml is:





      The class "DashBoardController" is never called when the request is served from fail-over node in cluster.
      If I call "dash board" from the same node where the session is created then, it works fine.

      the call to dashboard was made form filter.. the code snippet is...

      public class DWRFilter implements AjaxFilter {
      public Object doFilter(Object obj, Method method, Object[] params,
      AjaxFilterChain chain) throws Exception {
      return chain.doFilter(obj, method, params);


      I validated the session on fail-over node... it is same as parent node (where the session was created).

      Any pointers would be highly appreciated.


        • 1. Jboss cluster + Spring WebApplicationContext
          Suresh Reddy Newbie

          Some more info...

          I spent some more time in debugging the issue and narrowed down to spring layer is problematic...
          the WebApplicationContext is getting regenerated on session failover. when the active node goes down the second node is replicated with all the httpsession data but. when I observe the sping log statements... it says, WebAPplicationContext is closed (on first node) and on second node it is getting regenerated.
          However, when I print the underlying session data from WebApplicationContext... everything is fine i.e., all the session data (from node1) is replicated on node2.

          I'm totally confused.
          I went thru multiple forums and everywhere I see these kind of problems are addressed thru Terracota..

          Did anybody try spring + dwr application clustering on JBoss??

          Any pointers would be highly appreciated.


          • 2. Re: DWR issues in cluster....
            Suresh Reddy Newbie

            Please ignore this...
            I was wrong with my analysis. seems spring + dwr layer is not problematic.
            Anyway, I still have the problem unresolved... will post the details, once I get the fail-over working fine.