[jcifs] Infinite loop of error messages

Michael B Allen mba2000 at ioplex.com
Sun Nov 12 03:32:34 GMT 2006


I have added a finally clause to Transport.connect() that should
guarantee that the transport is left in a valid state. Additionally,
all instances of TransportException("Invalid state: " + state) have been
changed to log messages and, more importantly, the state is reset to
0 when this happends (which it shouldn't now). I have tested this with
examples/InterruptTest.java and found it works in my environment.

Mike

On Tue, 3 Oct 2006 15:12:17 -0400
Michael B Allen <mba2000 at ioplex.com> wrote:

> Ok, so interrupt() is ok but we would need to tweek the code to catch
> those. I'll add this to The List but for now just check the exit condition
> in between writes.
> 
> Mike
> 
> On Tue, 03 Oct 2006 13:46:23 -0400
> Jake Goulding <goulding at vivisimo.com> wrote:
> 
> > Yup, interrupt is the correct way of telling a thread to stop in the 
> > middle of processing. There are 4 different interrupt cases, described 
> > in the following link:
> > http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Thread.html#interrupt()
> > 
> > I can have multiple threads accessing the same host. The fact that an 
> > interrupt can leave the Transport in a bad state is very annoying, 
> > because then other threads will pick up the same bad transport and keep 
> > using it. It is something like this that can cause log files to be 
> > filled with errors, as the timeout never has a chance to occur.
> > 
> > Caldarale, Charles R wrote:
> > >> From: jcifs at lists.samba.org On Behalf Of Michael B Allen
> > >> Subject: Re: [jcifs] Infinite loop of error messages
> > >>
> > >> I believe Thread.interrupt() is deprecated and with good reason.
> > >>     
> > >
> > > It is neither deprecated nor dangerous, as the interrupt exception can
> > > only occur in well-defined condtions when the target thread is already
> > > blocked; normally, the target thread has to poll the isInterrupted()
> > > method to see if anyone is trying to get its attention.
> > >
> > > Perhaps you're thinking of Thread.suspend() or Thread.stop(), which
> > > truly are abominations?
> > >
> > >  - Chuck
> > >
> > >
> > > THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> > > MATERIAL and is thus for use only by the intended recipient. If you
> > > received this in error, please contact the sender and delete the e-mail
> > > and its attachments from all computers.
> > >
> > >   
> > 
> > -- 
> > 
> > JAKE GOULDING
> > Software Engineer
> > goulding at vivisimo.com
> > 
> > Viví­simo [Search Done Right™]
> > 1710 Murray Avenue
> > Pittsburgh, PA 15217 USA
> > tel: +1.412.422.2499 x105
> > fax: +1.412.422.2495
> > vivisimo.com      clusty.com
> > 
> 
> 
> -- 
> Michael B Allen
> PHP Active Directory SSO
> http://www.ioplex.com/
> 


-- 
Michael B Allen
PHP Active Directory SSO
http://www.ioplex.com/


More information about the jcifs mailing list