activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim McCabe (JIRA)" <j...@apache.org>
Subject [jira] Commented: (AMQ-796) Client may shtudown when failover connection is reconnecting. We need to maintain at least 1 non-daemon thread alive.
Date Thu, 06 May 2010 15:24:48 GMT

    [ https://issues.apache.org/activemq/browse/AMQ-796?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=59229#action_59229
] 

Jim McCabe commented on AMQ-796:
--------------------------------

The solution to this should be simple - just make sure the thread that performs the failover
logic does NOT call setDaemon(true).

Since this bug was fixed three years ago and came back to life, it would be nice if the code
took more steps to prevent this from happening in the future, for example:

- Override setDaemon(boolean) on that thread so that it never allows itself to be flagged
as a daemon.  If it is called in that way, output a stack trace with a message specifically
refering to this bug (AMQ-796).

- Add unit tests that would fail if another part of the code set the failover thread as a
daemon.  This seems like it would be a lot harder than the override approach above, but would
be nice if it were possible.

> Client may shtudown when failover connection is reconnecting.  We need to maintain at
least 1 non-daemon thread alive.
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: AMQ-796
>                 URL: https://issues.apache.org/activemq/browse/AMQ-796
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 4.0, 5.3.0
>            Reporter: Hiram Chirino
>            Assignee: Hiram Chirino
>             Fix For: 5.0.0, 4.0.3
>
>         Attachments: AMQ-796.cmd
>
>
> Dejan Reported on the User lists:
> Hi,
> after some experiments I found that this problem only exists if there are no
> other threads in the application. It seems like connection thread dies
> before it manages to reconnect. By starting another thread in the
> application, it succeeds to recover from master failure and reconnect to the
> slave broker. So I have a workaround for now, but it would be nice to make
> this work even for simple (single-threaded) clients.
> Regards,
> Dejan

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


Mime
View raw message