Package org.activemq.transport

Examples of org.activemq.transport.TransportChannelFactory


     * @return the TransportChannel to use with the embedded broker
     * @throws JMSException
     */
    protected TransportChannel createTransportChannel(String theURLString) throws JMSException {
        URI uri = createURI(theURLString);
        TransportChannelFactory factory = TransportChannelProvider.getFactory(uri);
        BrokerConnector brokerConnector = null;
        boolean created = false;
        TransportChannel transportChannel = null;
        boolean embedServer = isUseEmbeddedBroker() || factory.requiresEmbeddedBroker();
        if (embedServer) {
            synchronized (this) {
                if (factory.requiresEmbeddedBroker()) {
                    transportChannel = factory.create(getWireFormat(), uri);
                    brokerConnector = transportChannel.getEmbeddedBrokerConnector();
                }
                if (brokerConnector == null) {
                    brokerConnector = brokerContext.getConnectorByURL(theURLString);
                    if (brokerConnector == null) {
                        brokerConnector = createBrokerConnector(theURLString);
                        brokerContext.registerConnector(theURLString, brokerConnector);
                        startedEmbeddedBrokers.add(theURLString);
                        created = true;
                    }
                }
                else {
                    created = true;
                }
            }
        }
        if (transportChannel == null){
            transportChannel = factory.create(getWireFormat(), uri);
        }
      
        if (embedServer) {
            return ensureServerIsAvailable(uri, transportChannel, brokerConnector, created);
        }
View Full Code Here


     * @return the TransportChannel to use with the embedded broker
     * @throws JMSException
     */
    protected TransportChannel createTransportChannel(String theURLString) throws JMSException {
        URI uri = createURI(theURLString);
        TransportChannelFactory factory = TransportChannelProvider.getFactory(uri);
        BrokerConnector brokerConnector = null;
        boolean created = false;
        TransportChannel transportChannel = null;
        boolean embedServer = isUseEmbeddedBroker() || factory.requiresEmbeddedBroker();
        if (embedServer) {
            synchronized (this) {
                if (factory.requiresEmbeddedBroker()) {
                    transportChannel = factory.create(getWireFormat(), uri);
                    brokerConnector = transportChannel.getEmbeddedBrokerConnector();
                }
                if (brokerConnector == null) {
                    brokerConnector = brokerContext.getConnectorByURL(theURLString);
                    if (brokerConnector == null) {
                        brokerConnector = createBrokerConnector(theURLString);
                        brokerContext.registerConnector(theURLString, brokerConnector);
                        startedEmbeddedBrokers.add(theURLString);
                        created = true;
                    }
                }
                else {
                    created = true;
                }
            }
        }
        if (transportChannel == null){
            transportChannel = factory.create(getWireFormat(), uri);
        }
      
        if (embedServer) {
            return ensureServerIsAvailable(uri, transportChannel, brokerConnector, created);
        }
View Full Code Here

     * @return the TransportChannel to use with the embedded broker
     * @throws JMSException
     */
    protected TransportChannel createTransportChannel(String theURLString) throws JMSException {
        URI uri = createURI(theURLString);
        TransportChannelFactory factory = TransportChannelProvider.getFactory(uri);
        BrokerConnector brokerConnector = null;
        boolean created = false;
        TransportChannel transportChannel = null;
        boolean embedServer = isUseEmbeddedBroker() || factory.requiresEmbeddedBroker();
        if (embedServer) {
            synchronized (this) {
                if (factory.requiresEmbeddedBroker()) {
                    transportChannel = factory.create(getWireFormat(), uri);
                    brokerConnector = transportChannel.getEmbeddedBrokerConnector();
                }
                if (brokerConnector == null) {
                    brokerConnector = brokerContext.getConnectorByURL(theURLString);
                    if (brokerConnector == null) {
                        brokerConnector = createBrokerConnector(theURLString);
                        brokerContext.registerConnector(theURLString, brokerConnector);
                        startedEmbeddedBrokers.add(theURLString);
                        created = true;
                    }
                }
                else {
                    created = true;
                }
            }
        }
        if (transportChannel == null){
            transportChannel = factory.create(getWireFormat(), uri);
        }
      
        if (embedServer) {
            return ensureServerIsAvailable(uri, transportChannel, brokerConnector, created);
        }
View Full Code Here

TOP

Related Classes of org.activemq.transport.TransportChannelFactory

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.