Red Hat Bugzilla – Bug 480619
Remove need for explicit session sync() before Connection close()
Last modified: 2015-11-15 19:06:32 EST
Gordon Sim wrote:
> Alan Conway wrote:
>> Gordon Sim wrote:
>>> Sajid.Azami@tsx.com wrote:
>>>> Can you guys throw some light on these messages ... *Background:*
>>>> Recently I've implemented a Connection Pool (per process) for my
>>>> MrgServices - where each connection can be shared
>>>> by upto 10 sessions, I do close the session when I'm done, but the
>>>> connection is only closed when the last session
>>>> is close. Is this because of my connection pool.
>>> I would suggest a sync() just before you close the session if you are
>>> using any asynchronous communication. When a sync() and close on the
>>> session you should not get any such messages.
>> Perhaps we should do a sync() of all sessions in connection close() so
>> the user doesn't have to worry about this.
> Yes, I agree; I actually thinks there is something not 100% correct
> about the session detach process at present, but a sync() in the close
> is probably a quick workaround.
In addition to sync() we should set timeout to 0 to ensure clean close of the session.
As this can be easily worked around in the application I'm lowering the severity and re-targetting for after 1.1.1 due to time constraints.
*** Bug 453650 has been marked as a duplicate of this bug. ***
The error that the email thread quoted above is based on refers to warnings in the logs for *incoming* frames that are ignored. This is a result of not cancelling subscriptions (or not waiting for the cancellation to be confirmed) before closing the connection.
An explicit sync() is recommended as it allows any exceptions to be handled (e.g. the in doubt transfer may be invalid of may breach a queue limit).