activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Gellings (JIRA)" <jira+amq...@apache.org>
Subject [jira] Commented: (AMQNET-218) NMS session should dispose appropriately if listener delegate still processing message
Date Wed, 10 Feb 2010 00:11:34 GMT

    [ https://issues.apache.org/activemq/browse/AMQNET-218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=57479#action_57479
] 

Mark Gellings commented on AMQNET-218:
--------------------------------------

I'm expecting to catch a ThreadAbortException in my listener delegate but am not.

If this is my code to process the message should I see the "caught" message?  I'm seeing the
begin message and am not seeing the end message, but also am not seeing the caught message.

                             try
                              {
                                  Console.WriteLine("begin");
                                  Thread.Sleep(120000);
                                  Console.WriteLine("end");
                              }
                              catch (ThreadAbortException e)
                              {
                                  Console.WriteLine("caught");
                              }

I set the two properties on the Session.  Should I be setting these differently?  How do I
set them using the URI?


            ((Session) _session).DisposeStopTimeout = 30;
            ((Session)_session).CloseStopTimeout = 30;

It does seem to be aborting however just not exactly same behavior as v1.1

> NMS session should dispose appropriately if listener delegate still processing message
> --------------------------------------------------------------------------------------
>
>                 Key: AMQNET-218
>                 URL: https://issues.apache.org/activemq/browse/AMQNET-218
>             Project: ActiveMQ .Net
>          Issue Type: Bug
>          Components: NMS
>    Affects Versions: 1.2.0
>         Environment: ActiveMQ 5.2
>            Reporter: Mark Gellings
>            Assignee: Timothy Bish
>             Fix For: 1.2.0
>
>
> We have a unit test working with NMS 1.1 and not with NMS 1.2.
> It appears that in v1.2 on Session.Dispose the consumer thread is not aborted properly.
 If I'm processing a message say that takes 2 minutes to complete and try and dispose the
session it waits the full two minutes.
> With v1.1 if disposing on the session, it aborted after a timeout of 30s.  Calling dispose
on the message consumer directly would behave as calling dispose on the session is in v1.2.
> This is a problem if the consumer runs in a windows service as the SCM errors out when
a user tries to shut down the service.

-- 
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