[jcifs] Reconnect

Michael B. Allen miallen at eskimo.com
Fri Sep 27 05:36:49 EST 2002


On Fri, 27 Sep 2002 01:04:40 +0930
Daniel Cox <dcox at microbits.com.au> wrote:

> The CHANGES file suggests that reconnect should work nicely.
> 
> I have a small test class :-
> - it constructs an SmbFile and calls listFiles()
> - then pauses 10seconds
>  (this gives me time to find the process id on a samba server and kill
>  the connection)
> - then constructs a new SmbFile and calls listFiles() again
> 
> But the second call throws the following exception :-
> 
> Exception in thread "main" jcifs.smb.SmbException: Timeout waiting for 
> response
> from server. TEST<20>/192.168.100.200
>         at jcifs.smb.SmbTransport.sendTransaction(SmbTransport.java:615)
>         at jcifs.smb.SmbSession.sendTransaction(SmbSession.java:85)
> ..
> 
> I have tried this with 0.6.5 and 0.7.0b3.

I just tried this with 0.6.6 and 0.7.0b3 and was unable to reproduce
the problem. Can you please try the SlowRead example like:

[miallen at nano jcifs]$ java -cp jcifs-0.6.6.jar:. \
    -Djcifs.properties=../miallen.prp SlowRead smb://nano/tmp/lsfonts.out
Alexandria
Arial
ArialNarrow
A

Otherwise please create a mimimalistic program that reproduces the problem
and send it to me with a -Dlog=ALL trace and ethereal or netmon trace
if you can get one. Also, 10 seconds isn't even long enough for jCIFS
to disconnect. That takes 15 seconds by default.


> 
> Are there properties that need to be set for this to work correctly
> Or is there any other way to reset the connection information when
> exception is caught?
> 
> Thanks for any help you may be able to provide.
> Daniel.


-- 
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 importantly to tasks that have not
yet been conceived. 



More information about the jcifs mailing list