Package org.codehaus.activemq.transport

Examples of org.codehaus.activemq.transport.TransportChannel


    }
   
    public ReceiptHolder asyncSendWithReceipt(Packet packet) throws JMSException {
        long timeout = getEstablishConnectionTimeout();
    do {
            TransportChannel tc = getEstablishedChannel(timeout);
            if (tc != null) {
                try {
                    return tc.asyncSendWithReceipt(packet);
                }
                catch (TimeoutExpiredException e) {
                    throw e;
                }
                catch (UnsupportedWireFormatException uwf) {
View Full Code Here


     * handle exception from the embedded channel
     *
     * @param jmsEx
     */
    public void onException(JMSException jmsEx) {
        TransportChannel tc = this.channel;
        if (jmsEx instanceof UnsupportedWireFormatException) {
            fireException(jmsEx);
        }
        else {
            try {
View Full Code Here

     * @param packet
     * @param timeout
     * @return @throws JMSException
     */
    public Receipt send(Packet packet, int timeout) throws JMSException {
        TransportChannel tc = this.channel;
        while (true) {
            try {
                return tc.send(packet, timeout);
            }
            catch (JMSException jmsEx) {
                doReconnect(tc);
            }
        }
View Full Code Here

            }
        }
    }

    public void asyncSend(Packet packet) throws JMSException {
        TransportChannel tc = this.channel;
        while (true) {
            try {
                tc.asyncSend(packet);
                break;
            }
            catch (JMSException jmsEx) {
                doReconnect(tc);
            }
View Full Code Here

     * handle exception from the embedded channel
     *
     * @param jmsEx
     */
    public void onException(JMSException jmsEx) {
        TransportChannel tc = this.channel;
        try {
            doReconnect(tc);
        }
        catch (JMSException ex) {
            ex.setLinkedException(jmsEx);
View Full Code Here

                    startedEmbeddedBrokers.add(theURLString);
                    created = true;
                }
            }
        }
        TransportChannel transportChannel = factory.create(getWireFormat(), uri);
        if (embedServer) {
            return ensureServerIsAvailable(uri, transportChannel, brokerConnector, created);
        }
        return transportChannel;
    }
View Full Code Here

        }

        // now lets create a VM channel that the JMS client will use
        // to connect to the embedded brokerConnector
        URI localURI = createURI("vm", remoteLocation);
        TransportChannel localChannel = TransportChannelProvider.create(getWireFormat(), localURI);
        ensureVmServerIsAvailable(localChannel, brokerConnector);
        return localChannel;
    }
View Full Code Here

     * @return receipt - or null
     * @throws JMSException
     */
    public Receipt send(Packet packet, int timeout) throws JMSException {
        do {
            TransportChannel tc = getEstablishedChannel(timeout);
            if (tc != null) {
                try {
                    return tc.send(packet, timeout);
                }
                catch (TimeoutExpiredException e) {
                    throw e;
                }
                catch (UnsupportedWireFormatException uwf) {
View Full Code Here

     * @throws JMSException
     */
    public void asyncSend(Packet packet) throws JMSException {
        long timeout = getEstablishConnectionTimeout();
        do {
            TransportChannel tc = getEstablishedChannel(timeout);
            if (tc != null) {
                try {
                    tc.asyncSend(packet);
                    break;
                }
                catch (TimeoutExpiredException e) {
                    throw e;
                }
View Full Code Here

    }
   
    public ReceiptHolder asyncSendWithReceipt(Packet packet) throws JMSException {
        long timeout = getEstablishConnectionTimeout();
    do {
            TransportChannel tc = getEstablishedChannel(timeout);
            if (tc != null) {
                try {
                    return tc.asyncSendWithReceipt(packet);
                }
                catch (TimeoutExpiredException e) {
                    throw e;
                }
                catch (UnsupportedWireFormatException uwf) {
View Full Code Here

TOP

Related Classes of org.codehaus.activemq.transport.TransportChannel

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.