Package org.apache.activemq.broker

Examples of org.apache.activemq.broker.Connection


        return connectionId == connectionId2 || (connectionId != null && connectionId.equals(connectionId2));
    }

    public Connection[] getClients() throws Exception {
        ArrayList<Connection> l = new ArrayList<Connection>(connections);
        Connection rc[] = new Connection[l.size()];
        l.toArray(rc);
        return rc;
    }
View Full Code Here


    }

    @Override
    public Connection[] getClients() throws Exception {
        ArrayList<Connection> l = new ArrayList<Connection>(connections);
        Connection rc[] = new Connection[l.size()];
        l.toArray(rc);
        return rc;
    }
View Full Code Here

        return connectionId == connectionId2 || (connectionId != null && connectionId.equals(connectionId2));
    }

    public Connection[] getClients() throws Exception {
        ArrayList<Connection> l = new ArrayList<Connection>(connections);
        Connection rc[] = new Connection[l.size()];
        l.toArray(rc);
        return rc;
    }
View Full Code Here

    }

    @Override
    public Connection[] getClients() throws Exception {
        ArrayList<Connection> l = new ArrayList<Connection>(connections);
        Connection rc[] = new Connection[l.size()];
        l.toArray(rc);
        return rc;
    }
View Full Code Here

    public void TestOptimizedDispatchCME() throws Exception {
        final PersistenceAdapter persistenceAdapter = broker.getPersistenceAdapter();
        final MessageStore queueMessageStore =
            persistenceAdapter.createQueueMessageStore(destination);
        final ConnectionContext contextNotInTx = new ConnectionContext();
        contextNotInTx.setConnection(new Connection() {

            @Override
            public void stop() throws Exception {
            }
View Full Code Here

    }

    @Override
    public Connection[] getClients() throws Exception {
        ArrayList<Connection> l = new ArrayList<Connection>(connections);
        Connection rc[] = new Connection[l.size()];
        l.toArray(rc);
        return rc;
    }
View Full Code Here

        return connectionId == connectionId2 || (connectionId != null && connectionId.equals(connectionId2));
    }

    public Connection[] getClients() throws Exception {
        ArrayList l = new ArrayList(connections);
        Connection rc[] = new Connection[l.size()];
        l.toArray(rc);
        return rc;
    }
View Full Code Here

    }

    @Override
    public Connection[] getClients() throws Exception {
        ArrayList<Connection> l = new ArrayList<Connection>(connections);
        Connection rc[] = new Connection[l.size()];
        l.toArray(rc);
        return rc;
    }
View Full Code Here

                try {
                    LOG.info("aborting "
                            + (abortSubscriberConnection ? "connection" : "consumer")
                            + ", slow consumer: " + entry.getKey().getConsumerInfo().getConsumerId());

                    final Connection connection = connectionContext.getConnection();
                    if (connection != null) {
                        if (abortSubscriberConnection) {
                            scheduler.executeAfterDelay(new Runnable() {
                                public void run() {
                                    connection.serviceException(new InactivityIOException("Consumer was slow too often (>"
                                            + maxSlowCount +  ") or too long (>"
                                            + maxSlowDuration + "): " + entry.getKey().getConsumerInfo().getConsumerId()));
                                }}, 0l);
                        } else {
                            // just abort the consumer by telling it to stop
                            ConsumerControl stopConsumer = new ConsumerControl();
                            stopConsumer.setConsumerId(entry.getKey().getConsumerInfo().getConsumerId());
                            stopConsumer.setClose(true);
                            connection.dispatchAsync(stopConsumer);
                        }
                    } else {
                        LOG.debug("slowConsumer abort ignored, no connection in context:"  + connectionContext);
                    }
                } catch (Exception e) {
View Full Code Here

        return connectionId == connectionId2 || (connectionId != null && connectionId.equals(connectionId2));
    }

    public Connection[] getClients() throws Exception {
        ArrayList<Connection> l = new ArrayList<Connection>(connections);
        Connection rc[] = new Connection[l.size()];
        l.toArray(rc);
        return rc;
    }
View Full Code Here

TOP

Related Classes of org.apache.activemq.broker.Connection

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.