Package org.activemq.util

Examples of org.activemq.util.IdGenerator


     */
    protected PeerTransportChannel(WireFormat wireFormat, String serviceName) throws JMSException {
        this.wireFormat = wireFormat;
        this.serviceName = serviceName;
        this.discoveryURI = MulticastDiscoveryAgent.DEFAULT_DISCOVERY_URI;
        IdGenerator idGen = new IdGenerator();
        this.brokerName = idGen.generateId();
        this.brokerConnectorURI = DEFAULT_BROKER_CONNECTOR_URI;
        this.doDiscovery = true;
        if (serviceName == null || serviceName.length() == 0) {
            throw new IllegalStateException("No service name specified for peer:// protocol");
        }
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

                System.out.println("Loading Message Broker from file: " + file);
                factory.setResource(new FileSystemResource(file));
            }

            IdGenerator idgen = new IdGenerator();
            BrokerContainer container = factory.createBrokerContainer(idgen.generateId(), BrokerContext.getInstance());
            container.start();

            // lets wait until we're killed.
            Object lock = new Object();
            synchronized (lock) {
View Full Code Here

  protected ActiveMQConnection(ActiveMQConnectionFactory factory,
      String theUserName, String thePassword) {
    this.factory = factory;
    this.userName = theUserName;
    this.password = thePassword;
    this.clientIdGenerator = new IdGenerator();
    this.packetIdGenerator = new IdGenerator();
    this.handleIdGenerator = new IdGenerator();
    this.sessionIdGenerator = new IdGenerator();
    this.consumerNumberGenerator = new SynchronizedInt(0);
    this.sessions = new CopyOnWriteArrayList();
    this.messageDispatchers = new CopyOnWriteArrayList();
    this.connectionConsumers = new CopyOnWriteArrayList();
    this.connectionMetaData = new ActiveMQConnectionMetaData();
View Full Code Here

    protected void publish(int x, String subject) throws Exception {
        MessageProducer publisher = null;
        Connection connection = createConnectionFactory(brokerUrl, isEmbeddedBroker);

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

        Session session = createSession(connection, TRANSACTED_FALSE);
        Destination destination = createDestination(session, subject, isTopic);
        publisher = session.createProducer(destination);
View Full Code Here

     */
    protected void subscribe(String subject) throws JMSException {
        Connection connection = createConnectionFactory(brokerUrl, isEmbeddedBroker);

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

        //Start the connection before receiving messages.
        connection.start();
        Session session = createSession(connection, TRANSACTED_FALSE);
View Full Code Here

  protected ActiveMQConnection(ActiveMQConnectionFactory factory,
      String theUserName, String thePassword) {
    this.factory = factory;
    this.userName = theUserName;
    this.password = thePassword;
    this.clientIdGenerator = new IdGenerator();
    this.packetIdGenerator = new IdGenerator();
    this.handleIdGenerator = new IdGenerator();
    this.sessionIdGenerator = new IdGenerator();
    this.consumerNumberGenerator = new SynchronizedInt(0);
    this.sessions = new CopyOnWriteArrayList();
    this.messageDispatchers = new CopyOnWriteArrayList();
    this.connectionConsumers = new CopyOnWriteArrayList();
    this.connectionMetaData = new ActiveMQConnectionMetaData();
View Full Code Here

        this.connection = theConnection;
        this.acknowledgeMode = theAcknowledgeMode;
        setTransactionContext(new TransactionContext(theConnection));
        this.consumers = new CopyOnWriteArrayList();
        this.producers = new CopyOnWriteArrayList();
        this.temporaryDestinationGenerator = new IdGenerator();
        this.started = new SynchronizedBoolean(false);
        this.sessionId = connection.generateSessionId();
        this.startTime = System.currentTimeMillis();
        this.deliveredMessages = new DefaultQueueList();
        this.messageExecutor = new ActiveMQSessionExecutor(this, connection.getMemoryBoundedQueue("Session("
View Full Code Here

  protected ActiveMQConnection(ActiveMQConnectionFactory factory,
      String theUserName, String thePassword) {
    this.factory = factory;
    this.userName = theUserName;
    this.password = thePassword;
    this.clientIdGenerator = new IdGenerator();
    this.packetIdGenerator = new IdGenerator();
    this.handleIdGenerator = new IdGenerator();
    this.sessionIdGenerator = new IdGenerator();
    this.consumerNumberGenerator = new SynchronizedInt(0);
    this.sessions = new CopyOnWriteArrayList();
    this.messageDispatchers = new CopyOnWriteArrayList();
    this.connectionConsumers = new CopyOnWriteArrayList();
    this.connectionMetaData = new ActiveMQConnectionMetaData();
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.