[jcifs] jcifs.dcerpc.DcerpcPipeHandle: when close() doesn't

Michael B Allen ioplex at gmail.com
Tue Mar 23 13:44:29 MDT 2010


On Tue, Mar 23, 2010 at 2:23 PM, Del Merritt <del at alum.mit.edu> wrote:
> In the 1.3.14 version of jcifs.dcerpc.DcerpcHandle's close() method the
> SmbFileOutputStream "out" is closed but the corresponding
> SmbFileInputStream "in" is not.  In practice this seems to mean there is
> no way to guarantee the SmbTransport thread(s) created to handle
> response data will be closed in a timely manner.

Hi Del,

Actually those close methods do not really have any effect on the
SmbTransport threads. Transport threads are just left running until
the socket is idle for a while.

> This is a problem in a J2ME environment, where thread resources can be
> limited.

You can decrease jcifs.smb.client.soTimeout (the default is 35000
milliseconds). This will cause transport threads to exit more quickly.
But you have to adjust jcifs.smb.client.responseTimeout to be less
accordingly so as not to stop listening before a response has be
received.

Mike

-- 
Michael B Allen
Java Active Directory Integration
http://www.ioplex.com/


More information about the jCIFS mailing list