users@glassfish.java.net

Principal is lost after successful ProgrammaticLogin

From: Miroslav Nachev <miro_at_space-comm.com>
Date: Mon, 26 May 2008 02:38:40 +0300

Hi,

Is it normal the principal to be lost after the successful programmatic
login?
Initially the principal is "ANONYMOUS". Immediately after successful
login the principal is "test". On all next calls the principal again is
"ANONYMOUS":
   Login before: ANONYMOUS
   Login after: test

   Logout before: ANONYMOUS
   Logout after: ANONYMOUS

I am getting the principal as follow:
    sessionContext.getCallerPrincipal().getName()

The remote methods login(...) and logout() are placed in stateful bean.


Regards,
Miro.