Package org.xmlBlaster.engine.cluster

Examples of org.xmlBlaster.engine.cluster.ClusterManager


    * See useCluster() to check if clustering is switched on
    * First checks if ClusterManager is loaded already and if its state is ready.
    * @return
    */
   public final boolean isClusterManagerReady() {
      ClusterManager cm = this.clusterManager;
      return (cm != null && cm.isReady());
   }
View Full Code Here


      if (this.clusterManager == null) {
         if (!useCluster())
            return null;
         synchronized(this) {
            if (this.clusterManager == null) {
               this.clusterManager = new ClusterManager(this, sessionInfo);
               this.ME = "Global" + getLogPrefixDashed();
            }
         }
      }
      return this.clusterManager;
View Full Code Here

   public void tearDown() {
      serverScope.shutdown();
   }

   public void testParseConnectQos() {
      ClusterManager m = new ClusterManager(serverScope, null);

      try {
         m.init(serverScope, null);
         String xml =
            "<clusternode id='avalon'>"
          + "<connect><qos>"
          + "<address type='SOCKET'>"
          + "   socket://:7501"
View Full Code Here

         fail(e.toString());
      }
   }

   public void testParseConnectQosAttribute() {
      ClusterManager m = new ClusterManager(serverScope, null);

      try {
         m.init(serverScope, null);

         String xml =
              "<clusternode id='avalon'>" + "<connect><qos>"
            + "<address type='SOCKET'>"
            + "   socket://:7501"
View Full Code Here

         fail(e.toString());
      }
   }

   public void testParse() {
      ClusterManager m = new ClusterManager(serverScope, null);

      try {
         m.init(serverScope, null);

         String xml =
            "<clusternode id='heron.mycomp.com'> <!-- original xml markup -->\n" +
            "   <connect><qos>\n" +
            "     <address type='IOR'>IOR:09456087000</address>\n" +
View Full Code Here

         fail(e.toString());
      }
   }
  
   public void testParseState() {
      ClusterManager m = new ClusterManager(serverScope, null);

      try {
         m.init(serverScope, null);
 
         String xml =
         "<clusternode id='heron.mycomp.com'>\n" +
         "   <master stratum='1' refid='frodo' type='DomainPlugin' version='2.0' acceptDefault='false' acceptOtherDefault='true'>\n" +
         "     My own rule\n" +
View Full Code Here

               if (this.runlevelSet == null) this.runlevelSet = new TreeSet();
               this.runlevelSet.add(event);
            }
            else if (isConnectionStateEvent(event)) {
               // client/[subjectId]/session/[publicSessionId]/event/connectionState
               ClusterManager clusterManager = requestBroker.getServerScope().getClusterManager();
               if (clusterManager == null) {
                  log.warning("Configuration of '" + event + "' is ignored, no cluster manager available");
                  continue;
               }
               if (!clusterManager.isReady()) {
                  log.warning("Configuration of '" + event + "' is ignored, cluster manager is not ready");
                  continue;
               }
               int index = event.lastIndexOf("/event/");
               if (index == -1) {
                  log.warning("Configuration of '" + event + "' is ignored, wrong syntax");
                  continue;
               }
               // strip "event/connectionState"
               String name = event.substring(0, index);
               ClusterNode[] nodes = clusterManager.getClusterNodes();
               for (int ic=0; ic<nodes.length; ic++) {
                  ClusterNode node = nodes[ic];
                  SessionName destination = node.getSessionName();
                  if (destination != null && destination.matchRelativeName(name)) {
                     node.registerConnectionListener(this);
View Full Code Here

            buf.append("\n   ").append("</session>");
         }
         buf.append("\n  ").append("</client>");
      }

      ClusterManager clusterManager = g.getClusterManagerNoEx();
      if (clusterManager != null && clusterManager.isReady()) {
         ClusterNode[] nodes = clusterManager.getClusterNodes();
         for (int ic = 0; ic < nodes.length; ic++) {
            ClusterNode node = nodes[ic];
            SessionName destination = node.getRemoteSessionName();
            if (destination == null)
               continue;
View Full Code Here

TOP

Related Classes of org.xmlBlaster.engine.cluster.ClusterManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.