Here I am referring to "Session" level exceptions, not connection
level exceptions.
I should have made this more explicit with a title like "JMS Error
handling at the session level"..

For connection level exceptions (IO errors and AMQP connection
exceptions) we always notify through connection listener.
So how we handle connection level exceptions is correct and does not
need to be changed.

Regards,

Rajith

On Wed, May 25, 2011 at 2:59 AM, Danushka Menikkumbura
<danushka.menikkumb...@gmail.com> wrote:
> Rajith,
>
> I think the point here is how you differentiate exceptions which should be
> handled at the connection level and those which should be handled at the
> session level (or even somewhere down the line).
>
> Another concern in this case is the use of failover mutext as per [1].
>
> [1] - https://issues.apache.org/jira/browse/QPID-3259
>
> Danushka
>
> On Wed, May 25, 2011 at 1:47 AM, Rajith Attapattu <rajit...@gmail.com>wrote:
>
>> Folks,
>>
>> I am trying to tidy up the error handling code in the JMS client and
>> is soliciting ideas and feedback.
>> I also have rough proposal outlined below.
>> Please feel free to make suggestions/improvements for the following
>> solution or any alternative ideas that you might think maybe better.
>>
>> Currently if there is a session error we throw an exception on most
>> JMS methods in addition to notifying via the connection listener.
>> This is causing several issues with less than desirable results.
>> Besides I wonder if we need to notify the same exception in two
>> different ways.
>>
>> 1. There is a deadlock due to this.
>> 2. Even if the client is notified via a direct exception we still
>> throw a connection exception and close the connection (along with all
>> other sessions).
>>
>> I am wondering if the following is a good idea ?
>>
>> 1. If a direct exception can be thrown, then we don't notify via the
>> connection listener.
>>    Ex. sending messages, creating a producer/consumer etc...
>>
>> 2. If a direct exception cannot be thrown (ex. Message Listener case)
>> then we notify via the connection listener.
>>    In that case we don't care about the rest of the sessions being closed.
>>
>> 3. We mention in the documentation, that if a JMS exception is thrown,
>> they should recreate their session.
>>     If a specific type of exception like
>> "MessageNotReadableException" is thrown, then they are advised to
>> treat it accordingly.
>>
>> Regards,
>>
>> Rajith
>>
>> ---------------------------------------------------------------------
>> Apache Qpid - AMQP Messaging Implementation
>> Project:      http://qpid.apache.org
>> Use/Interact: mailto:dev-subscr...@qpid.apache.org
>>
>>
>

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

Reply via email to