[jcifs] Re: Disconnect from a share

Michael B Allen mba2000 at ioplex.com
Wed Oct 19 18:40:09 GMT 2005


On Wed, 19 Oct 2005 12:51:51 +0000 (UTC)
Alexander Saupp <asaupp at web.de> wrote:

> >If JCIFS has an existing session with the desired domain and username
> >then probably not. It will simply reuse the existing session even with
> >jcifs.smb.client.ssnLimit=1. You would have to use different credentials
> >each time you query to ensure that a new transport is created.
> 
>     You might be right for the session - but the transport is definitly a 
>     new one.
> 	public class SmbTransport extends Transport implements SmbConstants {
>         ...
> 	static synchronized SmbTransport getSmbTransport( UniAddress address,
>                          int port, InetAddress localAddr, int localPort ) {
> 	    ...
> 	    if( SSN_LIMIT != 1 ) {
> 	        ..
>             }
> 	    conn = new SmbTransport( address, port, localAddr, localPort );

You're assuming getSmbTransport is being called each time a new session
is created. It is not.

I'll try your test program but it might take me a while.

Mike


More information about the jcifs mailing list