Examples of ProducerId


Examples of org.apache.activemq.command.ProducerId

        }
    }

    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

Examples of org.apache.activemq.command.ProducerId

     */
    public synchronized boolean isDuplicate(final MessageId id) {
        boolean answer = false;
       
        if (id != null) {
            ProducerId pid = id.getProducerId();
            if (pid != null) {
                BitArrayBin bab = map.get(pid);
                if (bab == null) {
                    bab = new BitArrayBin(auditDepth);
                    map.put(pid, bab);
View Full Code Here

Examples of org.apache.activemq.command.ProducerId

     *
     * @param id
     */
    public synchronized void rollback(final  MessageId id) {
        if (id != null) {
            ProducerId pid = id.getProducerId();
            if (pid != null) {
                BitArrayBin bab = map.get(pid);
                if (bab != null) {
                    bab.setBit(id.getProducerSequenceId(), false);
                }
View Full Code Here

Examples of org.apache.activemq.command.ProducerId

     */
    public synchronized boolean isInOrder(final MessageId id) {
        boolean answer = false;

        if (id != null) {
            ProducerId pid = id.getProducerId();
            if (pid != null) {
                BitArrayBin bab = map.get(pid);
                if (bab == null) {
                    bab = new BitArrayBin(auditDepth);
                    map.put(pid, bab);
View Full Code Here

Examples of org.apache.activemq.command.ProducerId

    private void writeObject(Object object) throws IOException {
        openWireformat.marshal(object, ds);
    }
   
    protected DataStructure createDataStructure(long index) {
        ProducerId id = new ProducerId();
        id.setConnectionId(connectionId);
        id.setSessionId(index);
        id.setValue(index);
       
        ProducerInfo object = new ProducerInfo();
        object.setProducerId(id);
        object.setDestination(destination);
        return object;
View Full Code Here

Examples of org.apache.activemq.command.ProducerId

   
    protected void assertDataStructureExpected(DataStructure object, long i) {
        assertEquals("Type of object for index: " + i, ProducerInfo.class, object.getClass());
        ProducerInfo command = (ProducerInfo) object;
       
        ProducerId id = command.getProducerId();
        assertNotNull("ProducerID for object at index: " + i, id);
       
        assertEquals("connection ID in object: "+ i, connectionId, id.getConnectionId());
        String actual = Long.toHexString(id.getValue());
        String expected = Long.toHexString(i);
        assertEquals("value of object: "+ i + " was: " + actual, expected, actual);
        assertEquals("value of object: "+ i + " was: " + actual, i, id.getSessionId());
    }
View Full Code Here

Examples of org.apache.activemq.command.ProducerId

    }

    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

Examples of org.apache.activemq.command.ProducerId

    /**
     * @return
     */
    protected ProducerId getNextProducerId() {
        return new ProducerId(info.getSessionId(), producerIdGenerator.getNextSequenceId());
    }
View Full Code Here

Examples of org.apache.activemq.command.ProducerId

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

Examples of org.apache.activemq.command.ProducerId

    HashMap<ProducerId, boolean[]> tracker = new HashMap<ProducerId, boolean[]>();
    private synchronized void track(Message message) {
        try {
            MessageId id = new MessageId(message.getJMSMessageID());
            ProducerId pid = id.getProducerId();
            int seq = (int)id.getProducerSequenceId();
            boolean[] ids = tracker.get(pid);
            if (ids == null) {
                ids = new boolean[TO_SEND + 1];
                ids[seq] = true;
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.