[jcifs] How to get hold of SmbSession object
Michael B Allen
mba2000 at ioplex.com
Sat Sep 27 05:28:02 EST 2003
> I am using jCIFS to authenticate users against Win2k/Windows 2003 domain
> servers (using the logon() method in SmbSession). The question is how do I
> get access to the session object created after a successful user
> authentication. I would like to close/kill this session (call logoff)
> I have validated the user. The current API does not allow that. Also, the
> logoff() method in SmbSession class is private.
There is no public logoff() method because transports (and all sessions
over them) automatically close after jcifs.smb.client.soTimeout and I have
otherwise failed to identify an instance where logoff() would be useful.
Sessions are shared internally so opening and closing a connection to the
target frequently would only create unnecessary overhead.
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 important, to tasks that have not
yet been conceived.
More information about the jcifs