[jcifs] Re: Loadbalancing with NTLMServlet/Filter

Eric eglass1 at comcast.net
Sat Mar 20 11:06:16 GMT 2004

> Ahh, I thought he meant load balancing across domain controllers. So we
> just need to call getSession() and that's enough to trigger this session
> id thing. Ok. It would be nice to know *excatly* where I should do that.
> Mike

Slapping it right at the top of doFilter would definitely take care of 
the problem.  It should be okay (and preferable) to put it right before 
the challenge is sent instead (when we know that NTLM is involved):

if (msg.startsWith("NTLM ")) {
     byte[] challenge = SmbSession.getChallenge( dc );

This would prevent unnecessarily creating a session for clients that 
aren't capable of NTLM etc.


More information about the jcifs mailing list