Examples of TransportConnector


Examples of org.apache.activemq.broker.TransportConnector

    protected String getRemoteURI() {
        return "tcp://localhost:0?wireFormat.tcpNoDelayEnabled=true";
    }

    protected TransportConnector createConnector() throws Exception, IOException, URISyntaxException {
        TransportConnector x = super.createConnector();
        x.setDiscoveryUri(new URI(getDiscoveryUri()));
        return x;
    }
View Full Code Here

Examples of org.apache.activemq.broker.TransportConnector

      }
        return "multicast://default?group="+groupName;
    }

    protected TransportConnector createRemoteConnector() throws Exception, IOException, URISyntaxException {
        TransportConnector x = super.createRemoteConnector();
        x.setDiscoveryUri(new URI(getDiscoveryUri()));
        return x;
    }
View Full Code Here

Examples of org.apache.activemq.broker.TransportConnector

  protected void setUp() throws Exception {
    bs = new BrokerService();
    bs.setDeleteAllMessagesOnStartup(true);
    bs.setPersistent(true);
    bs.setUseJmx(true);
    TransportConnector connector = bs.addConnector("tcp://localhost:0");
    bs.start();
    tcpUri = connector.getConnectUri();

    cf = new ActiveMQConnectionFactory("failover://(" + tcpUri + ")");

    sendMessagesToQueue();
  }
View Full Code Here

Examples of org.apache.activemq.broker.TransportConnector

        }
        return result;
    }

    private boolean verifySslCredentials(BrokerService broker) throws Exception {
        TransportConnector connector = broker.getTransportConnectors().get(0);
        URI brokerUri = connector.getConnectUri();

        SSLContext context = SSLContext.getInstance("TLS");       
        CertChainCatcher catcher = new CertChainCatcher();
        context.init(null, new TrustManager[] {catcher}, null);
       
View Full Code Here

Examples of org.apache.activemq.broker.TransportConnector

            for (JmsConnector connector : broker.getJmsBridgeConnectors()) {
                connector.stop();
            }
        }
        for (Object o : broker.getTransportConnectors()) {
            TransportConnector tc = (TransportConnector) o;
            tc.stop();

        }
        broker.stop();
    }
View Full Code Here

Examples of org.apache.activemq.broker.TransportConnector

        // way
        if (!useDuplex) {
            brokers.get("BrokerB").broker.setAllowTempAutoCreationOnSend(true);
        }

        TransportConnector forClient = brokers.get("BrokerA").broker.addConnector("tcp://localhost:0");
        startAllBrokers();
        waitForBridgeFormation();
        waitForMinTopicRegionConsumerCount("BrokerB", 1);
        waitForMinTopicRegionConsumerCount("BrokerA", 1);

        ConnectionFactory factory = new ActiveMQConnectionFactory(forClient.getConnectUri());
        ActiveMQConnection conn = (ActiveMQConnection) factory.createConnection();
        conn.setWatchTopicAdvisories(false);
        conn.start();
        Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
View Full Code Here

Examples of org.apache.activemq.broker.TransportConnector

            for (JmsConnector connector : broker.getJmsBridgeConnectors()) {
                connector.stop();
            }
        }
        for (Object o : broker.getTransportConnectors()) {
            TransportConnector tc = (TransportConnector) o;
            tc.stop();

        }
        broker.stop();
    }
View Full Code Here

Examples of org.apache.activemq.broker.TransportConnector

    public ObjectName[] getDynamicDestinationProducers() {
        return safeGetBroker().getDynamicDestinationProducers();
    }

    public String addConnector(String discoveryAddress) throws Exception {
        TransportConnector connector = brokerService.addConnector(discoveryAddress);
        if (connector == null) {
            throw new NoSuchElementException("Not connector matched the given name: " + discoveryAddress);
        }
        connector.start();
        return connector.getName();
    }
View Full Code Here

Examples of org.apache.activemq.broker.TransportConnector

        connector.start();
        return connector.getName();
    }

    public boolean removeConnector(String connectorName) throws Exception {
        TransportConnector connector = brokerService.getConnectorByName(connectorName);
        if (connector == null) {
            throw new NoSuchElementException("Not connector matched the given name: " + connectorName);
        }
        connector.stop();
        return brokerService.removeConnector(connector);
    }
View Full Code Here

Examples of org.apache.activemq.broker.TransportConnector

        broker = new BrokerService();
        broker.setPersistent(false);
        broker.setUseJmx(false);
        broker.setAdvisorySupport(false);
        broker.setDeleteAllMessagesOnStartup(true);
        TransportConnector tcpConnector = broker.addConnector(tcpBindAddress);
        TransportConnector httpConnector = broker.addConnector(httpBindAddress);
        broker.start();
        broker.waitUntilStarted();

        WaitForJettyListener.waitForJettySocketToAccept(httpConnector.getPublishableConnectString());

        tcpConnectionFactory = new ActiveMQConnectionFactory(tcpConnector.getPublishableConnectString());
        tcpConnectionFactory.setUseCompression(true);
        httpConnectionFactory = new ActiveMQConnectionFactory(httpConnector.getPublishableConnectString());
        httpConnectionFactory.setUseCompression(true);
        tcpConnection = (ActiveMQConnection) tcpConnectionFactory.createConnection();
        httpConnection = (ActiveMQConnection) httpConnectionFactory.createConnection();
        tcpSession = tcpConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
        httpSession = httpConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
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.