Package org.activemq.util

Examples of org.activemq.util.IdGenerator


    /**
     * A static factory method that can be used in Spring config files using a factory method
     * mechanism to create a broker container easily.
     */
    public static BrokerContainer newInstance(Resource resource) {
        IdGenerator idgen = new IdGenerator();
        return newInstance(resource, idgen.generateId());
    }
View Full Code Here


    private Map localDiscoveryDetails;
    private Set remoteClientIds;


    public BrokerContainerImpl() {
        this(new IdGenerator().generateId());
    }
View Full Code Here

    /**
     * Default Constructor of BrokerClientImpl
     */
    public BrokerClientImpl() {
        this.packetIdGenerator = new IdGenerator();
        this.closed = new SynchronizedBoolean(false);
        this.started = new SynchronizedBoolean(false);
        this.activeConsumers = new HashSet();
        this.consumers = new CopyOnWriteArrayList();
        this.producers = new CopyOnWriteArrayList();
View Full Code Here

    private void createBroker() throws ResourceAdapterInternalException {
        try {
            BrokerContainerFactory brokerContainerFactory = XmlConfigHelper.createBrokerContainerFactory(getBrokerXmlConfig());

            IdGenerator idgen = new IdGenerator();
            container = brokerContainerFactory.createBrokerContainer(idgen.generateId(), BrokerContext.getInstance());
            container.start();
            connectionFactory = new ActiveMQConnectionFactory(container, getServerUrl());
        } catch (JMSException e) {
            log.error(e.toString(), e);
            throw new ResourceAdapterInternalException("Failed to startup an embedded broker", e);
View Full Code Here

            if ((ServerConnectionFactory.JORAM_SERVER.equals(this.getMQServer()))||
                (ServerConnectionFactory.MANTARAY_SERVER.equals(this.getMQServer()))) {
                //Id set be server

            } else {
                IdGenerator idGenerator = new IdGenerator();
                connection.setClientID(idGenerator.generateId());
            }
        }

        session = ServerConnectionFactory.createSession(connection,
                                                        this.getTransacted(),
View Full Code Here

            if ((ServerConnectionFactory.JORAM_SERVER.equals(this.getMQServer())) ||
                (ServerConnectionFactory.MANTARAY_SERVER.equals(this.getMQServer()))) {
                //Id set by server

            } else {
                IdGenerator idGenerator = new IdGenerator();
                connection.setClientID(idGenerator.generateId());
            }
        }

        //start connection before receiving messages.
        connection.start();
View Full Code Here

                                                                                ACTIVEMQ_SERVER,
                                                                                this.getTopic(),
                                                                                this.getEmbeddedBroker());

        if (this.getDurable()) {
            IdGenerator idGenerator = new IdGenerator();
            connection.setClientID(idGenerator.generateId());
        }

        //start connection before receiving messages.
        connection.start();
View Full Code Here

        Connection connection = ServerConnectionFactory.createConnectionFactory(this.getURL(),
                                                                                ACTIVEMQ_SERVER,
                                                                                this.getTopic(),
                                                                                this.getEmbeddedBroker());
        if (this.getDurable()) {
            IdGenerator idGenerator = new IdGenerator();
            connection.setClientID(idGenerator.generateId());
        }

        Session session = ServerConnectionFactory.createSession(connection,
                                                                this.getTransacted(),
                                                                ACTIVEMQ_SERVER,
View Full Code Here

                                                                                ACTIVEMQ_SERVER,
                                                                                this.getTopic(),
                                                                                this.getEmbeddedBroker());

        if (this.getDurable()) {
            IdGenerator idGenerator = new IdGenerator();
            connection.setClientID(idGenerator.generateId());
        }

        Session session = ServerConnectionFactory.createSession(connection,
                                                                TRANSACTED_FALSE,
                                                                ACTIVEMQ_SERVER,
View Full Code Here

                                                                                ACTIVEMQ_SERVER,
                                                                                this.getTopic(),
                                                                                this.getEmbeddedBroker());

        if (this.getDurable()) {
            IdGenerator idGenerator = new IdGenerator();
            connection.setClientID(idGenerator.generateId());

        }

        //start connection before receiving messages.
        connection.start();
View Full Code Here

TOP

Related Classes of org.activemq.util.IdGenerator

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.