Examples of Bridge


Examples of org.hornetq.core.server.cluster.Bridge

         ClientConsumer cons1 = session1.createConsumer(queueName0);

         session1.start();

         Bridge bridge = server0.getClusterManager().getBridges().get(bridgeName);
         RemotingConnection forwardingConnection = getForwardingConnection(bridge);
         InVMConnector.failOnCreateConnection = true;
         InVMConnector.numberOfFailures = reconnectAttempts - 1;
         forwardingConnection.fail(new HornetQException(HornetQException.NOT_CONNECTED));
View Full Code Here

Examples of org.hornetq.core.server.cluster.Bridge

                   " is configured to not use duplicate detecion, it will send messages synchronously");
      }

      clusterLocators.add(serverLocator);

      Bridge bridge = new BridgeImpl(serverLocator,
                                     config.getReconnectAttempts(),
                                     config.getRetryInterval(),
                                     config.getRetryIntervalMultiplier(),
                                     config.getMaxRetryInterval(),
                                     nodeUUID,
                                     new SimpleString(config.getName()),
                                     queue,
                                     executorFactory.getExecutor(),
                                     SimpleString.toSimpleString(config.getFilterString()),
                                     SimpleString.toSimpleString(config.getForwardingAddress()),
                                     scheduledExecutor,
                                     transformer,
                                     config.isUseDuplicateDetection(),
                                     config.getUser(),
                                     config.getPassword(),
                                     !backup,
                                     server.getStorageManager());

      bridges.put(config.getName(), bridge);

      managementService.registerBridge(bridge, config);
     
      if (start)
      {
         bridge.start();
      }

   }
View Full Code Here

Examples of org.hornetq.core.server.cluster.Bridge

   }

   public void destroyBridge(final String name) throws Exception
   {
      Bridge bridge;

      synchronized (this)
      {
         bridge = bridges.remove(name);
         if (bridge != null)
         {
            bridge.stop();
            managementService.unregisterBridge(name);
         }
      }

      bridge.flushExecutor();
   }
View Full Code Here

Examples of org.hornetq.core.server.cluster.Bridge

                                final Queue queue,
                                final boolean start) throws Exception
   {
      MessageFlowRecordImpl record = new MessageFlowRecordImpl(queue);

      Bridge bridge = new ClusterConnectionBridge(serverLocator,
                                                  nodeUUID,
                                                  nodeID,
                                                  queueName,
                                                  queue,
                                                  executorFactory.getExecutor(),
                                                  null,
                                                  null,
                                                  scheduledExecutor,
                                                  null,
                                                  useDuplicateDetection,
                                                  clusterUser,
                                                  clusterPassword,
                                                  !backup,
                                                  server.getStorageManager(),
                                                  managementService.getManagementAddress(),
                                                  managementService.getManagementNotificationAddress(),
                                                  record,
                                                  connector);

      record.setBridge(bridge);

      records.put(nodeID, record);

      if (start)
      {
         bridge.start();
      }
   }
View Full Code Here

Examples of org.hornetq.core.server.cluster.Bridge

   {
      String out = name + " connected to\n";
      for (Entry<String, MessageFlowRecord> messageFlow : records.entrySet())
      {
         String nodeID = messageFlow.getKey();
         Bridge bridge = messageFlow.getValue().getBridge();
        
         out += "\t" + nodeID + " -- " + bridge.isStarted() + "\n";
      }
     
      return out;
   }
View Full Code Here

Examples of org.hornetq.core.server.cluster.Bridge

                   " is configured to not use duplicate detecion, it will send messages synchronously");
      }

      clusterLocators.add(serverLocator);

      Bridge bridge = new BridgeImpl(serverLocator,
                                     config.getReconnectAttempts(),
                                     config.getRetryInterval(),
                                     config.getRetryIntervalMultiplier(),
                                     config.getMaxRetryInterval(),
                                     nodeUUID,
                                     new SimpleString(config.getName()),
                                     queue,
                                     executorFactory.getExecutor(),
                                     SimpleString.toSimpleString(config.getFilterString()),
                                     SimpleString.toSimpleString(config.getForwardingAddress()),
                                     scheduledExecutor,
                                     transformer,
                                     config.isUseDuplicateDetection(),
                                     config.getUser(),
                                     config.getPassword(),
                                     !backup,
                                     server.getStorageManager());

      bridges.put(config.getName(), bridge);

      managementService.registerBridge(bridge, config);
     
      if (start)
      {
         bridge.start();
      }

   }
View Full Code Here

Examples of org.hornetq.core.server.cluster.Bridge

   }

   public void destroyBridge(final String name) throws Exception
   {
      Bridge bridge;

      synchronized (this)
      {
         bridge = bridges.remove(name);
         if (bridge != null)
         {
            bridge.stop();
            managementService.unregisterBridge(name);
         }
      }

      bridge.flushExecutor();
   }
View Full Code Here

Examples of org.jboss.as.console.client.shared.subsys.messaging.model.Bridge

                    List<Property> model = response.get(RESULT).asPropertyList();
                    List<Bridge> bridges = new ArrayList<Bridge>();
                    for(Property prop : model)
                    {
                        ModelNode svc = prop.getValue();
                        Bridge entity = bridgeAdapter.fromDMR(svc);
                        entity.setName(prop.getName());

                        entity.setStaticConnectors(EntityAdapter.modelToList(svc, "static-connectors"));
                        bridges.add(entity);
                    }

                    getView().setBridges(bridges);
View Full Code Here

Examples of org.jboss.as.console.client.shared.subsys.messaging.model.Bridge

                    List<Property> model = response.get(RESULT).asPropertyList();
                    List<Bridge> bridges = new ArrayList<Bridge>();
                    for(Property prop : model)
                    {
                        ModelNode svc = prop.getValue();
                        Bridge entity = bridgeAdapter.fromDMR(svc);
                        entity.setName(prop.getName());

                        entity.setStaticConnectors(EntityAdapter.modelToList(svc, "static-connectors"));
                        bridges.add(entity);
                    }

                    getView().setBridges(bridges);
View Full Code Here

Examples of org.jboss.jms.server.bridge.Bridge

    * Send some more messages
    * Verify all messages are received
    */
   public void testCrashAndReconnectDestCrashOnCommit() throws Exception
   {
      Bridge bridge = null;
           
      try
      {
         final int NUM_MESSAGES = 10;        
        
         bridge = new Bridge(cff0, cff1, sourceQueueFactory, targetQueueFactory,
                  null, null, null, null,
                  null, 1000, -1, Bridge.QOS_ONCE_AND_ONLY_ONCE,
                  NUM_MESSAGES, -1,
                  null, null, false);
        
         bridge.start();
        
         //Poison server 1 so it crashes on commit of dest but after prepare
        
         //This means the transaction branch on source will get commmitted
         //but the branch on dest won't be - it will remain prepared
         //This corresponds to a HeuristicMixedException
        
         ServerManagement.poisonTheServer(1, PoisonInterceptor.TYPE_2PC_COMMIT);
        
         log.info("Poisoned server");
        
         //Send some messages
        
         sendMessages(cf0, sourceQueue, 0, NUM_MESSAGES, true);
             
         //Restart the server
        
         //Wait a bit for the batch to be sent - this should cause the server to crash on commit
        
         Thread.sleep(3000);
        
         log.info("Restarting server");
                 
         ServerManagement.start(1, "all", false);
        
         log.info("Restarted server");   
        
         ServerManagement.deployQueue("targetQueue", 1);
                 
         this.setUpAdministeredObjects();
                       
         log.info("Deployed queue");
        
         log.info("*** waiting for recovery");
            
         //There may be a long wait for the first time (need to let recovery kick in)
         checkMessagesReceived(cf1, targetQueue, Bridge.QOS_ONCE_AND_ONLY_ONCE, NUM_MESSAGES, true);
      }
      finally
      {     
         if (bridge != null)
         {
            try
            {
               bridge.stop();
            }
            catch (Exception e)
            {
               log.error("Failed to stop bridge", e);
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.