Package org.apache.qpid.server.txn

Examples of org.apache.qpid.server.txn.NonTransactionalContext


        _prefetch_HighWaterMark = DEFAULT_PREFETCH;
        _prefetch_LowWaterMark = _prefetch_HighWaterMark / 2;
        _messageStore = messageStore;
        _exchanges = exchanges;
        // by default the session is non-transactional
        _txnContext = new NonTransactionalContext(_messageStore, _storeContext, this, _returnMessages, _browsedAcks);
    }
View Full Code Here


            if (!(_txnContext instanceof NonTransactionalContext))
            {
                // if (_nonTransactedContext == null)
                {
                    _nonTransactedContext =
                        new NonTransactionalContext(_messageStore, _storeContext, this, _returnMessages, _browsedAcks);
                }

                deliveryContext = _nonTransactedContext;
            }
            else
View Full Code Here

            if (!(_txnContext instanceof NonTransactionalContext))
            {
                // if (_nonTransactedContext == null)
                {
                    _nonTransactedContext =
                        new NonTransactionalContext(_messageStore, _storeContext, this, _returnMessages, _browsedAcks);
                }

                deliveryContext = _nonTransactedContext;
            }
            else
View Full Code Here

        if (!(_txnContext instanceof NonTransactionalContext))
        {
            if (_nonTransactedContext == null)
            {
                _nonTransactedContext =
                    new NonTransactionalContext(_messageStore, _storeContext, this, _returnMessages, _browsedAcks);
            }

            deliveryContext = _nonTransactedContext;
        }
        else
View Full Code Here

        publishMessages(count, false);
    }

    private void publishMessages(int count, boolean persistent) throws AMQException
    {
        TransactionalContext txnContext = new NonTransactionalContext(_messageStore, _storeContext, null,
                                                                      new LinkedList<RequiredDeliveryException>(),
                                                                      new HashSet<Long>());
        MessageHandleFactory factory = new MessageHandleFactory();
        for (int i = 1; i <= count; i++)
        {
View Full Code Here

        publish.exchange = new NullExchange().getName();
        ContentHeaderBody header = new ContentHeaderBody();
        List<ContentBody> body = new ArrayList<ContentBody>();
        MessageStore messageStore = new SkeletonMessageStore();
        // channel can be null since it is only used in ack processing which does not apply to this test
        TransactionalContext txContext = new NonTransactionalContext(messageStore, null,
                                                                     new LinkedList<RequiredDeliveryException>());
        body.add(new ContentBody());
        MessageHandleFactory factory = new MessageHandleFactory();
        for (int i = 0; i < count; i++)
        {
View Full Code Here

        publishMessages(count, false);
    }

    private void publishMessages(int count, boolean persistent) throws AMQException
    {
        TransactionalContext txnContext = new NonTransactionalContext(_messageStore, _storeContext, null,
                                                                      new LinkedList<RequiredDeliveryException>()
        );
        _queue.registerSubscription(_subscription,false);
        MessageHandleFactory factory = new MessageHandleFactory();
        for (int i = 1; i <= count; i++)
View Full Code Here

        private final List<Long> _unacked;
        private StoreContext _storeContext = new StoreContext();

        Scenario(int messageCount, List<Long> acked, List<Long> unacked) throws Exception
        {
            TransactionalContext txnContext = new NonTransactionalContext(new TestMemoryMessageStore(),
                                                                          _storeContext, null,
                                                                          new LinkedList<RequiredDeliveryException>()
            );
            AMQQueue queue =
                    AMQQueueFactory.createAMQQueueImpl(new AMQShortString("test"), false, null, false, new VirtualHost("test", new MemoryMessageStore()),
                                                       null);

            for (int i = 0; i < messageCount; i++)
            {
                long deliveryTag = i + 1;

                MessagePublishInfo info = new MessagePublishInfo()
                {

                    public AMQShortString getExchange()
                    {
                        return null;
                    }

                    public void setExchange(AMQShortString exchange)
                    {
                        //To change body of implemented methods use File | Settings | File Templates.
                    }

                    public boolean isImmediate()
                    {
                        return false;
                    }

                    public boolean isMandatory()
                    {
                        return false;
                    }

                    public AMQShortString getRoutingKey()
                    {
                        return null;
                    }
                };

                TestMessage message = new TestMessage(deliveryTag, i, info, txnContext.getStoreContext());
                _map.add(deliveryTag, queue.enqueue(new StoreContext(), message));
            }
            _acked = acked;
            _unacked = unacked;
        }
View Full Code Here


            MessageHandleFactory messageHandleFactory = new MessageHandleFactory();
            long maxId = 1;

            TransactionalContext txnContext = new NonTransactionalContext(this, new StoreContext(), null, null);

            Statement stmt = conn.createStatement();
            ResultSet rs = stmt.executeQuery(SELECT_FROM_QUEUE_ENTRY);

View Full Code Here


        _messageStore = messageStore;

        // by default the session is non-transactional
        _txnContext = new NonTransactionalContext(_messageStore, _storeContext, this, _returnMessages);
    }
View Full Code Here

TOP

Related Classes of org.apache.qpid.server.txn.NonTransactionalContext

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.