Examples of onException()


Examples of org.apache.activemq.transport.TransportListener.onException()

          brokerInfoReceived.countDown();

          for (Iterator<TransportListener> iter = transportListeners
              .iterator(); iter.hasNext();) {
            TransportListener listener = iter.next();
            listener.onException(error);
          }
        }
      });
    }
  }
View Full Code Here

Examples of org.apache.activemq.transport.TransportListener.onException()

            peer.enqueueValve.decrement();
        }

        if( transportListener!=null ) {
            if( command == DISCONNECT ) {
                transportListener.onException(new TransportDisposedIOException("Peer (" + peer.toString() + ") disposed."));
            } else {
                transportListener.onCommand(command);
            }
        }
    }
View Full Code Here

Examples of org.apache.activemq.transport.TransportListener.onException()

        LinkedBlockingQueue<Object> mq = getMessageQueue();
        Object command = mq.poll();
        if (command != null) {
            if( command == DISCONNECT ) {
                tl.onException(new TransportDisposedIOException("Peer (" + peer.toString() + ") disposed."));
            } else {
                tl.onCommand(command);
            }
            return !mq.isEmpty();
        } else {
View Full Code Here

Examples of org.apache.activemq.transport.TransportListener.onException()

        }

        Object command = mq.poll();
        if (command != null && !disposed.get()) {
            if( command == DISCONNECT ) {
                tl.onException(new TransportDisposedIOException("Peer (" + peer.toString() + ") disposed."));
            } else {
                tl.onCommand(command);
            }
            return !mq.isEmpty() && !disposed.get();
        } else {
View Full Code Here

Examples of org.apache.activemq.transport.TransportListener.onException()

                        LOG.warn("Exception during connection cleanup, " + e, e);
                    }
                    for (Iterator<TransportListener> iter = transportListeners
                            .iterator(); iter.hasNext();) {
                        TransportListener listener = iter.next();
                        listener.onException(error);
                    }
                }
            });
        }
    }
View Full Code Here

Examples of org.apache.activemq.transport.TransportListener.onException()

            LOG.warn("Exception during connection cleanup, " + e, e);
          }
          for (Iterator<TransportListener> iter = transportListeners
              .iterator(); iter.hasNext();) {
            TransportListener listener = iter.next();
            listener.onException(error);
          }
        }
      });
    }
  }
View Full Code Here

Examples of org.apache.activemq.transport.TransportListener.onException()

        LinkedBlockingQueue<Object> mq = getMessageQueue();
        Object command = mq.poll();
        if (command != null) {
            if( command == DISCONNECT ) {
                tl.onException(new TransportDisposedIOException("Peer (" + peer.toString() + ") disposed."));
            } else {
                tl.onCommand(command);
            }
            return !mq.isEmpty();
        } else {
View Full Code Here

Examples of org.apache.activemq.transport.TransportListener.onException()

        LinkedBlockingQueue<Object> mq = getMessageQueue();
        Object command = mq.poll();
        if (command != null) {
            if( command == DISCONNECT ) {
                tl.onException(new TransportDisposedIOException("Peer (" + peer.toString() + ") disposed."));
            } else {
                tl.onCommand(command);
            }
            return !mq.isEmpty();
        } else {
View Full Code Here

Examples of org.apache.activemq.transport.mock.MockTransport.onException()

            connection.start();
        }

        public void failConnection() {
            MockTransport mockTransport = connection.getTransportChannel().narrow(MockTransport.class);
            mockTransport.onException(new IOException("Simulated error"));
        }

        public void start() {
            new Thread(this).start();
        }
View Full Code Here

Examples of org.apache.activemq.transport.mock.MockTransport.onException()

    }

    private void createConnectionFailure(Connection connection) throws Exception {
        ActiveMQConnection c = ((PooledConnection)connection).getConnection();
        MockTransport t = (MockTransport)c.getTransportChannel().narrow(MockTransport.class);
        t.onException(new IOException("forcing exception for " + getName() + " to force pool eviction"));
        LOG.info("arranged for failure, chucked exception");
    }

    private void sendMessage(Connection connection) throws JMSException {
        Session session = connection.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.