4 Replies Latest reply on Mar 3, 2004 12:53 AM by ammon

    ::::::intercept dead instance of jboss :::::

    ammon sekhemt Newbie

      I want to intercept the dead instance of jboss in cluster... you have suggestions....?

      Thanks

        • 1. Re: ::::::intercept dead instance of jboss :::::
          Peter Goetz Newbie

          Hi,

          can you explain what you mean with intercept?

          Peter

          • 2. Re: ::::::intercept dead instance of jboss :::::
            ammon Newbie

            Sorry If I do not write well in English but I am using a tool of translation...

            Well ....
            I want to create a class that notices when in the partition dies a node ..
            example when dies a node I look "Dead members ..."
            Thanks

            • 3. Re: ::::::intercept dead instance of jboss :::::
              Michael Daleiden Newbie

              Take a look at the TopologyMonitorService MBean (org.jboss.ha.framework.server.util.TopologyMonitorService), and the TriggerServiceName attribute:

              <?xml version="1.0" encoding="UTF-8"?>
              
              <!-- ===================================================================== -->
              <!-- -->
              <!-- Topology Monitor Service Configuration -->
              <!-- -->
              <!-- ===================================================================== -->
              
              <server>
              
               <classpath codebase="lib" archives="jbossha.jar"/>
              
               <mbean code="org.jboss.ha.framework.server.util.TopologyMonitorService"
               name="Telematics:service=TopologyService">
               <attribute name="PartitionName">DefaultPartition</attribute>
               <attribute name="TriggerServiceName"></attribute>
               </mbean>
              
              </server>


              Basically, you can create an MBean that implements the following method, then set the TriggerServiceName to the ObjectName of your MBean:

              /**
               * Updates the MBean based on cluster membership changes.
               *
               * @param deadMembers list of cluster members that have died
               *
               * @param newMembers list of cluster members that have joined
               *
               * @param allMembers list of all active cluster members
               *
               * @param logCategoryName log4j category name for logging messages
               *
               * @jmx.managed-operation
               */
               public void membershipChanged(ArrayList deadMembers, ArrayList newMembers,
               ArrayList allMembers, String logCategoryName) {


              I use this mechanism to clean up a distributed cache (JBoss TreeCache) when one of the servers in the cluster dies unexpectedly.