Examples of acknowledge()


Examples of javax.jms.Message.acknowledge()

        //Receive 3 in sorted order
        received = assertReceiveAndValidateMessage(consumer, "1");
        received.acknowledge();
        received = assertReceiveAndValidateMessage(consumer, "2");
        received.acknowledge();
        received = assertReceiveAndValidateMessage(consumer, "3");
        received.acknowledge();

        //Send 1
        sendAndCommitMessage(producer,"4");
View Full Code Here

Examples of javax.jms.Message.acknowledge()

        received = assertReceiveAndValidateMessage(consumer, "1");
        received.acknowledge();
        received = assertReceiveAndValidateMessage(consumer, "2");
        received.acknowledge();
        received = assertReceiveAndValidateMessage(consumer, "3");
        received.acknowledge();

        //Send 1
        sendAndCommitMessage(producer,"4");

        //Receive 1 and recover
View Full Code Here

Examples of javax.jms.Message.acknowledge()

        received = assertReceiveAndValidateMessage(consumer, "4");
        consumerSession.recover();

        //Receive same 1
        received = assertReceiveAndValidateMessage(consumer, "4");
        received.acknowledge();

        //Send 3 out of order
        sendAndCommitMessage(producer,"7");
        sendAndCommitMessage(producer,"6");
        sendAndCommitMessage(producer,"5");
View Full Code Here

Examples of javax.jms.Message.acknowledge()

        resendMessagesIfNecessary();

        // tests whether receiving and acknowledgment is working after recover
        Message lastMessage = consumeMessages();
        lastMessage.acknowledge();
    }

    /**
     * Test that receiving more messages after failover and then calling
     * {@link Session#recover()} does not throw an exception
View Full Code Here

Examples of javax.jms.Message.acknowledge()

        // recover should successfully restore session
        _consumerSession.recover();

        // tests whether receiving and acknowledgment is working after recover
        Message lastMessage = consumeMessages();
        lastMessage.acknowledge();
    }

    /**
     * Test that first call to {@link Message#acknowledge()} after failover
     * throws a JMSEXception if session is dirty.
View Full Code Here

Examples of javax.jms.Message.acknowledge()

        assertFailoverException();

        try
        {
            // an implicit recover performed when acknowledge throws an exception due to failover
            lastMessage.acknowledge();
            fail("JMSException should be thrown");
        }
        catch (JMSException t)
        {
            // TODO: assert error code and/or expected exception type
View Full Code Here

Examples of javax.jms.Message.acknowledge()

        resendMessagesIfNecessary();

        // tests whether receiving and acknowledgment is working after recover
        lastMessage = consumeMessages();
        lastMessage.acknowledge();
    }

    /**
     * Test that calling acknowledge before failover leaves the session
     * clean for use after failover.
View Full Code Here

Examples of javax.jms.Message.acknowledge()

        produceMessages();

        // consume messages and acknowledge them
        Message lastMessage = consumeMessages();
        lastMessage.acknowledge();

        causeFailure();

        assertFailoverException();
View Full Code Here

Examples of javax.jms.Message.acknowledge()

        produceMessages();

        // tests whether receiving and acknowledgment is working after recover
        lastMessage = consumeMessages();
        lastMessage.acknowledge();
    }

    /**
     * Test that receiving of messages after failover prior to calling
     * {@link Message#acknowledge()} still results in acknowledge throwing an exception.
View Full Code Here

Examples of javax.jms.Message.acknowledge()

        // consume again on dirty session
        Message lastMessage = consumeMessages();
        try
        {
            // an implicit recover performed when acknowledge throws an exception due to failover
            lastMessage.acknowledge();
            fail("JMSException should be thrown");
        }
        catch (JMSException t)
        {
            // TODO: assert error code and/or expected exception type
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.