[jcifs] Reconnect

Daniel Cox dcox at microbits.com.au
Fri Sep 27 01:34:40 EST 2002


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.

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.



More information about the jcifs mailing list