"Sandhya " wrote in message
> Hi,
> I am using a JAAS authentication in weblogic 7.0. After the authentication

> done successfully, I am storing the user's information as a part of the

> of the Subject. For this I am using a customized principal class object i

> created. So when the user is committed in the JAAS framework i am storing

> principals as a part of the subject. The actual code looks like,
> principal = new myPrincipal(userInfo);
> this.subject.getPrincipals().add(principal);
> So when I need to retrive it, I use getCurrentSubject() and cast the

> from it and retrive the necessry information from it. Like the sample code

> like,
> Subject subject = Security.getCurrentSubject();
> MyPrincipal myPrincipal = null;
> Set principalSet = subject.getPrincipals();
> Iterator principals = principalSet.iterator();
> myPrincipal = (myPrincipal) principals.next();
> The above code works fine for most case, but when invoking multiple

threads of
> hte same user, like with the same login, mutliple process is invoked which

> trun will fetch the user's information from the subject part, it retrives

> from the principal. Can u help me find out whne in is the case that a

> gets stored and would i be able to avoid it.

Double check that you are in a thread which should have the user identity.
If so, then this sounds like a bug so contact BEA support and file a support