Package org.apache.activemq.network

Examples of org.apache.activemq.network.DiscoveryNetworkConnector.start()


                listener.onServiceRemove(event);
            }
        });

        broker1.addNetworkConnector(nc);
        nc.start();

        // Wait for the bridge to be formed by the first attempt.
        waitForBridge(broker1.getBrokerName(), broker2.getBrokerName(),
                MAX_TEST_TIME, TimeUnit.MILLISECONDS);
View Full Code Here


            }
        };
        nc.setDiscoveryAgent(da);

        broker1.addNetworkConnector(nc);
        nc.start();

        // All bridge attempts should fail, so the attempt latch should get
        // triggered. However, because of the race condition, the first attempt
        // is considered successful and causes further attempts to stop.
        // Therefore, this wait will time out and cause the test to fail.
View Full Code Here

            DtoNetworkConnector networkConnector = (DtoNetworkConnector) o;
            if (networkConnector.getUri() != null) {
                try {
                    DiscoveryNetworkConnector nc = fromDto(networkConnector, new DiscoveryNetworkConnector());
                    getBrokerService().addNetworkConnector(nc);
                    nc.start();
                    info("started new network connector: " + nc);
                } catch (Exception e) {
                    info("Failed to add new networkConnector " + networkConnector, e);
                }
            }
View Full Code Here

        URI ncUri = new URI("static:(" + connector.getConnectUri().toString() + ")");
        NetworkConnector nc = new DiscoveryNetworkConnector(ncUri);
        nc.setDuplex(true);
        remoteBroker.addNetworkConnector(nc);
        nc.start();
    }

    protected void tearDown() throws Exception {
        if (remoteBroker.isStarted()) {
            remoteBroker.stop();
View Full Code Here

        discoveryAgent.setServices(remoteUrl);

        dnc.setDiscoveryAgent(discoveryAgent);

        broker.addNetworkConnector(dnc);
        dnc.start();
    }

    private void startMessageConsumer() throws JMSException, URISyntaxException {
        String url = "vm://TestBroker";
        ActiveMQConnection connection = ActiveMQConnection.makeConnection(url);
View Full Code Here

        discoveryAgent.setServices(remoteUrl);

        dnc.setDiscoveryAgent(discoveryAgent);

        broker.addNetworkConnector(dnc);
        dnc.start();
    }

    private void startMessageSend() {
        new Thread(new MessageSend()).start();
    }
View Full Code Here

        discoveryAgent.setServices(remoteUrl);

        dnc.setDiscoveryAgent(discoveryAgent);

        broker.addNetworkConnector(dnc);
        dnc.start();
    }

    private void startMessageConsumer() throws JMSException, URISyntaxException {
        String url = "vm://TestBroker";
        ActiveMQConnection connection = ActiveMQConnection.makeConnection(url);
View Full Code Here

        discoveryAgent.setServices(remoteUrl);

        dnc.setDiscoveryAgent(discoveryAgent);

        broker.addNetworkConnector(dnc);
        dnc.start();
    }

    private void startMessageSend() {
        new Thread(new MessageSend()).start();
    }
View Full Code Here

                listener.onServiceRemove(event);
            }
        });

        broker1.addNetworkConnector(nc);
        nc.start();

        // Wait for the bridge to be formed by the first attempt.
        waitForBridge(broker1.getBrokerName(), broker2.getBrokerName(),
                MAX_TEST_TIME, TimeUnit.MILLISECONDS);
View Full Code Here

            }
        };
        nc.setDiscoveryAgent(da);

        broker1.addNetworkConnector(nc);
        nc.start();

        // All bridge attempts should fail, so the attempt latch should get
        // triggered. However, because of the race condition, the first attempt
        // is considered successful and causes further attempts to stop.
        // Therefore, this wait will time out and cause the test to fail.
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.