[jcifs] RE: Deletion of files on the network

Sujit Jagdev sujit.jagdev at casero.com
Fri Feb 14 06:55:31 EST 2003

I am having issues deleting tow files on the network successively.
The first attempt succeeds. However as soon as you try to try to delete
the second file, and SmbException is thrown with the message.
"The file is being used by another process."
I have done some debugging and it seems like I am unable to proceed
until the SmbTransport.tryClose() method is called when

catch( InterruptedIOException iioe ) {
                if( responseTable.size() == 0 ) {
                    System.out.println("Size of table is " +
                    tryClose( false );
                } else {
                    Log.println( Log.WARNINGS, "smb warning",
                                " soTimeout has occured but there are "
                                responseTable.size() + " pending
requests" );
            } catch( IOException ioe ) {
                tryClose( true );
                Log.printStackTrace( "exception reading from socket
input: " + address, ioe );

Why do I have to wait until the first SmbSession is "logged off" or
closed before I can delete the second totally different file.



The information contained in this message is proprietary of Casero Inc.,
protected from disclosure, and may be privileged. The information is
intended to be conveyed only to the designated recipient(s) of the
message. If the reader of this message is not the intended recipient,
you are hereby notified that any dissemination, use, distribution or
copying of this communication is strictly prohibited and may be
unlawful. If you have received this communication in error, please
notify us immediately by replying to the message and deleting it from
your computer. Thank you.

More information about the jcifs mailing list