[jcifs] threading

Dan Dumont dan at canofsleep.com
Sun Feb 23 16:31:06 EST 2003

That's fine with me, perhaps I did not make my intentions clear.  I
don't mind if it blocks the thread.  What I do mind is that it blocks
all other threads trying to connect also.

The whole program locks up while I wait for one thread to connect.  

-----Original Message-----
From: Michael B. Allen [mailto:miallen at eskimo.com] 
Sent: Sunday, February 23, 2003 12:06 AM
To: Dan Dumont
Cc: crh at ubiqx.mn.org; jcifs at samba.org
Subject: Re: [jcifs] threading

On Sat, 22 Feb 2003 17:58:59 -0500
Dan Dumont <dan at canofsleep.com> wrote:

> OS: winXP
> JVM: 1.3.1
> -----Original Message-----
> From: Christopher R. Hertel [mailto:crh at ubiqx.mn.org] 
> Sent: Saturday, February 22, 2003 5:51 PM
> To: Dan Dumont
> Cc: jcifs at samba.org
> Subject: Re: [jcifs] threading
> [On List]
> On Sat, Feb 22, 2003 at 04:36:20PM -0500, Dan Dumont wrote:
> :
> > this is the error I get when the thread finally dies:
> > jcifs.smb.SmbException: Connection timed out: connect
> > 	at jcifs.smb.SmbTransport.send(SmbTransport.java:476)
> > 	at jcifs.smb.SmbTransport.negotiate(SmbTransport.java:664)
> > 	at jcifs.smb.SmbTree.treeConnect(SmbTree.java:116)
> > 	at jcifs.smb.SmbFile.connect(SmbFile.java:514)
> > 	at jcifs.smb.SmbFile.connect0(SmbFile.java:484)
> > 	at jcifs.smb.SmbFile.sendTransaction(SmbFile.java:460)
> > 	at jcifs.smb.SmbFile.listFiles(SmbFile.java:1325)
> > 	at jcifs.smb.SmbFile.listFiles(SmbFile.java:1237)
> > 	at T2Crawler.<init>(T2Crawler.java:91)
> > 	at T2Crawler.main(T2Crawler.java:114)

This is standard behavior for a host that does not respond to a SYN
packet. Try another client. Or just try writing a trivial socket program
to test against the errant server. It will always hang the thread for

> The connect() function on a Unix box can block if the socket is not
> to
> non-blocking before the call is made.  It would take some testing (the

You cannot set a socket non-blocking in Java.


A  program should be written to model the concepts of the task it
performs rather than the physical world or a process because this
maximizes  the  potential  for it to be applied to tasks that are
conceptually  similar and, more important, to tasks that have not
yet been conceived. 

More information about the jcifs mailing list