Package org.apache.activemq.command

Examples of org.apache.activemq.command.ProducerId


        return info;
    }

    protected void populateObject(Object object) throws Exception {
        super.populateObject(object);
        ProducerId info = (ProducerId) object;

        info.setConnectionId("ConnectionId:1");
        info.setValue(1);
        info.setSessionId(2);
    }
View Full Code Here


    protected SessionId createSessionId(String string) {
        return new SessionId(createConnectionId(string), ++counter);
    }

    protected ProducerId createProducerId(String string) {
        return new ProducerId(createSessionId(string), ++counter);
    }
View Full Code Here

public class ProducerIdTest extends DataFileGeneratorTestSupport {

    public static final ProducerIdTest SINGLETON = new ProducerIdTest();

    public Object createObject() throws Exception {
        ProducerId info = new ProducerId();
        populateObject(info);
        return info;
    }
View Full Code Here

        return info;
    }

    protected void populateObject(Object object) throws Exception {
        super.populateObject(object);
        ProducerId info = (ProducerId)object;
        info.setConnectionId("ConnectionId:1");
        info.setValue(1);
        info.setSessionId(2);

    }
View Full Code Here


    public static final ProducerIdTest SINGLETON = new ProducerIdTest();

    public Object createObject() throws Exception {
        ProducerId info = new ProducerId();
        populateObject(info);
        return info;
    }
View Full Code Here

        return info;
    }

    protected void populateObject(Object object) throws Exception {
        super.populateObject(object);
        ProducerId info = (ProducerId) object;

        info.setConnectionId("ConnectionId:1");
        info.setValue(1);
        info.setSessionId(2);
    }
View Full Code Here

    }

    public Response processMessage(Message send) throws Exception {
        if (send != null) {
            if (trackTransactions && send.getTransactionId() != null) {
                ProducerId producerId = send.getProducerId();
                ConnectionId connectionId = producerId.getParentId().getParentId();
                if (connectionId != null) {
                    ConnectionState cs = connectionStates.get(connectionId);
                    if (cs != null) {
                        TransactionState transactionState = cs.getTransactionState(send.getTransactionId());
                        if (transactionState != null) {
                            transactionState.addCommand(send);
                           
                            if (trackTransactionProducers) {
                                // for jmstemplate, track the producer in case it is closed before commit
                                // and needs to be replayed
                                SessionState ss = cs.getSessionState(producerId.getParentId());
                                ProducerState producerState = ss.getProducerState(producerId);
                                producerState.setTransactionState(transactionState);           
                            }
                        }
                    }
View Full Code Here

    /**
     * @return
     */
    private ProducerId createProducerId() {
        return new ProducerId(connectionSessionId, producerIdGenerator.getNextSequenceId());
    }
View Full Code Here

        return answer;
    }

    public void addProducer(ConnectionContext context, ProducerInfo info) throws Exception {
        super.addProducer(context, info);
        ProducerId producerId = info.getProducerId();
        synchronized (lock) {
            producers.put(producerId, info);
        }
        generateFile();
    }
View Full Code Here

        }
    }

    public void removeProducer(ConnectionContext context, ProducerInfo info) throws Exception {
        super.removeProducer(context, info);
        ProducerId producerId = info.getProducerId();
        if (redrawOnRemove) {
            synchronized (lock) {
                producerDestinations.remove(producerId);
                producers.remove(producerId);
            }
View Full Code Here

TOP

Related Classes of org.apache.activemq.command.ProducerId

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.