0 Replies Latest reply on Nov 5, 2004 9:42 AM by ppine7

    how to suspend one node in a cluster programmatically?

    ppine7

      Hi,
      We are developing a new sysem based on JBoss4 and one of the requirements is to support load-ballancing and failover between two instances of the JBoss servers. We have installed and configured the Apache mod-jk for that and it works fine.
      One problem that we still have to solve, though, is to automatically stop one instance of the JBoss server for some maintenance without severing all active sessions on the server.
      We would like to create an automated process that does the following:
      1. when there is a need to stop one of the servers, the process will 'mark' the server as becoming unavailable soon - lets call it node1
      2. all active sessions that are beeing processed on node1 continue until they finish
      3. all new requests are redirected to the other server instance - node2
      4. when all active sessions finish on the node1, the node1 is shutdown
      5. at this point, all requests should go to the node2

      The question is: how to make the node1 look dead for apache's mod-jk without physically shutting it down? Basically, we need some way of keeping the node1 up to finish processing of all active sessions but have mod-jk redirect all incoming requests to the node2 as though node1 was down already.

      We were wondering if there are some internal JMX (or some other) components in the JBoss server that we could use to manipulate the state of the nodes programmatically

      If you could give some documentation/ examples pointers it woudl be great!

      Thank you!
      Marina