activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuconic <...@git.apache.org>
Subject [GitHub] activemq-artemis pull request #1207: Many fixes around some tests I'm doing
Date Tue, 18 Apr 2017 04:05:37 GMT
Github user clebertsuconic commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/1207#discussion_r111867332
  
    --- Diff: artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPSessionCallback.java
---
    @@ -380,22 +403,26 @@ public void serverSend(final Transaction transaction,
              }
           }
     
    -      recoverContext();
    +      OperationContext oldcontext = recoverContext();
     
    -      PagingStore store = manager.getServer().getPagingManager().getPageStore(message.getAddressSimpleString());
    -      if (store.isRejectingMessages()) {
    -         // We drop pre-settled messages (and abort any associated Tx)
    -         if (delivery.remotelySettled()) {
    -            if (transaction != null) {
    -               String amqpAddress = delivery.getLink().getTarget().getAddress();
    -               ActiveMQException e = new ActiveMQAMQPResourceLimitExceededException("Address
is full: " + amqpAddress);
    -               transaction.markAsRollbackOnly(e);
    +      try {
    +         PagingStore store = manager.getServer().getPagingManager().getPageStore(message.getAddressSimpleString());
    +         if (store.isRejectingMessages()) {
    +            // We drop pre-settled messages (and abort any associated Tx)
    +            if (delivery.remotelySettled()) {
    +               if (transaction != null) {
    +                  String amqpAddress = delivery.getLink().getTarget().getAddress();
    +                  ActiveMQException e = new ActiveMQAMQPResourceLimitExceededException("Address
is full: " + amqpAddress);
    +                  transaction.markAsRollbackOnly(e);
    +               }
    +            } else {
    +               rejectMessage(delivery, AmqpError.RESOURCE_LIMIT_EXCEEDED, "Address is
full: " + address);
                 }
              } else {
    -            rejectMessage(delivery, AmqpError.RESOURCE_LIMIT_EXCEEDED, "Address is full:
" + address);
    +            serverSend(transaction, message, delivery, receiver);
    --- End diff --
    
    what the?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message