I have found the way to do it. The servlet should use the ClientLoginModule for the clients calling EJBS with in the VM from the login-config.xml. and then i can set the multi-threaded option to true which inturn sets the SecurityAssociation.setServer() thats fine.
new LoginContext("client-login", Callbackhandler);
call the login() method
Should work fine