You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Robbie Gemmell (JIRA)" <ji...@apache.org> on 2010/11/01 11:11:28 UTC

[jira] Updated: (QPID-2848) BasicMessageProducer_0_10 contains dead and questionable code

     [ https://issues.apache.org/jira/browse/QPID-2848?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robbie Gemmell updated QPID-2848:
---------------------------------

    Fix Version/s:     (was: 0.7)

Updating 'Fix For'  to Unknown on issues not targeted for 0.8

> BasicMessageProducer_0_10 contains dead and questionable code
> -------------------------------------------------------------
>
>                 Key: QPID-2848
>                 URL: https://issues.apache.org/jira/browse/QPID-2848
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client
>    Affects Versions: M3, M4, 0.5, 0.6
>            Reporter: Robbie Gemmell
>
> In BasicMessageProducer_0_10, there is a field named _preAcquire. Its value is set true by default and toggled false at construction time if the given destination is an instance of AMQQueue.
> During the notifyMessage() method, when client side selector evaluation of the incoming message is performed in the checkPreConditions() method, if the filter indicates the message is not a match then the _preAcquire field is used to determine acknowledgement and/or release actions to take that would seem to indicate the _preAcquire field is meant to describe the session acquire mode. Judging this value based on the incoming destination does not seem correct as this is actually a property of the Session used. 
> Subsequent to the above mentioned uses the _preAcquire field is also used to determine whether to accept the message.
> Further to the above, the code called to perform acknowledgement and releases is dead and can never actually execute because it too depends on the _preAcquire field but inverted from the previous use:
> if (_preAcquire)
> {
>     ...
>     acknowledgeMessage(message);
> }
> else
> {
>     ...
>     releaseMessage(message);
> }
> followed by:
> private void acknowledgeMessage(AbstractJMSMessage message) throws AMQException
> {
>     if (!_preAcquire)
>     {
>         ...
>     }
> }
> and:
> private void releaseMessage(AbstractJMSMessage message) throws AMQException
> {
>     if (_preAcquire)
>     {
>         ...
>     }
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org