activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Czaban...@dgt.com.pl>
Subject Re: NMS\Apache.NMS\tags\1.2.0 not working under Windows 2000
Date Tue, 02 Mar 2010 12:07:51 GMT



Timothy Bish wrote:
> 
> If you want to come p with a patch and attach it to a Jira issue we can
> take
> a look at it.
> 
> On Mon, Mar 1, 2010 at 5:49 PM, Czaban <c@dgt.com.pl> wrote:
> 
>>
>> NMS\Apache.NMS\tags\1.2.0 used method form .NET .NET Framework 2.0
>> service
>> pack 2 - windows 2000 can working with .NET .NET Framework 2.0 service
>> pack
>> 1 only - work aroIf you want to und seems to be simply - please consider
>> this problem.
>>
>>
>> System.MissingMethodException: Method not found: 'Boolean
>> System.Threading.WaitHandle.WaitOne(System.TimeSpan)'.
>>   at Apache.NMS.ActiveMQ.Transport.InactivityMonitor.StopMonitorThreads()
>>   at
>> Apache.NMS.ActiveMQ.Transport.InactivityMonitor.OnException(ITransport
>> sender, Exception command)
>>   at Apache.NMS.ActiveMQ.Transport.Tcp.TcpTransport.ReadLoop()
>>   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
>>   at System.Threading.ExecutionContext.Run(ExecutionContext
>> executionContext, ContextCallback callback, Object state)
>>   at System.Threading.ThreadHelper.ThreadStart()
>>
>> --
>> View this message in context:
>> http://old.nabble.com/NMS%5CApache.NMS%5Ctags%5C1.2.0-not-working-under-Windows-2000-tp27750135p27750135.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>>
> 
> 

Jira is not know to me.

 private void StopMonitorThreads()
        {
            lock(monitor)
            {
                if(monitorStarted.CompareAndSet(true, false))
                {
                    AutoResetEvent shutdownEvent = new
AutoResetEvent(false);

                    // Attempt to wait for the Timers to shutdown, but don't
wait
                    // forever, if they don't shutdown after two seconds,
just quit.
                    this.readCheckTimer.Dispose(shutdownEvent);
                    shutdownEvent.WaitOne(TimeSpan.FromMilliseconds(2000));
                    this.writeCheckTimer.Dispose(shutdownEvent);
                    shutdownEvent.WaitOne(TimeSpan.FromMilliseconds(2000));

					this.asyncTasks.Shutdown();
                    this.asyncTasks = null;
                    this.asyncWriteTask = null;
                    this.asyncErrorTask = null;
                }
            }
        }

just add bool true argument to
shutdownEvent.WaitOne(TimeSpan.FromMilliseconds(2000));
like that:

 private void StopMonitorThreads()
        {
            lock(monitor)
            {
                if(monitorStarted.CompareAndSet(true, false))
                {
                    AutoResetEvent shutdownEvent = new
AutoResetEvent(false);

                    // Attempt to wait for the Timers to shutdown, but don't
wait
                    // forever, if they don't shutdown after two seconds,
just quit.
                    this.readCheckTimer.Dispose(shutdownEvent);
                   
shutdownEvent.WaitOne(TimeSpan.FromMilliseconds(2000),true);
                    this.writeCheckTimer.Dispose(shutdownEvent);
                   
shutdownEvent.WaitOne(TimeSpan.FromMilliseconds(2000),true);

					this.asyncTasks.Shutdown();
                    this.asyncTasks = null;
                    this.asyncWriteTask = null;
                    this.asyncErrorTask = null;
                }
            }
        }

and Windows 2000 is back to the business with ActiveMQ under C#.




-- 
View this message in context: http://old.nabble.com/NMS%5CApache.NMS%5Ctags%5C1.2.0-not-working-under-Windows-2000-tp27750135p27755083.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message