Package org.activemq.service

Examples of org.activemq.service.TransactionTask


     * Not synchronized since the Journal has better throughput if you increase
     * the number of conncurrent writes that it is doing.
     */
    public void addMessage(final ActiveMQMessage message) throws JMSException {
        final RecordLocation location = peristenceAdapter.writePacket(destinationName, message, message.isReceiptRequired());
        TransactionManager.getContexTransaction().addPostCommitTask(new TransactionTask(){
            public void execute() throws Throwable {
                synchronized (JournalMessageStore.this) {
                    nextMark = location;
                    MessageIdentity id = message.getJMSMessageIdentity();
                    addedMessageIds.put(id, location);
View Full Code Here


    /**
     */
    public void removeMessage(final MessageAck ack) throws JMSException {

        final RecordLocation ackLocation = peristenceAdapter.writePacket(destinationName, ack, ack.isReceiptRequired());       
        TransactionManager.getContexTransaction().addPostCommitTask(new TransactionTask(){
            public void execute() throws Throwable {
                synchronized (JournalMessageStore.this) {
                    nextMark = ackLocation;
                    MessageIdentity id = ack.getMessageIdentity();
                    if (addedMessageIds.remove(id) == null) {
View Full Code Here

TOP

Related Classes of org.activemq.service.TransactionTask

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.