users@glassfish.java.net

Re: Principal is lost after successful ProgrammaticLogin

From: Miroslav Nachev <miro_at_space-comm.com>
Date: Mon, 26 May 2008 21:53:55 +0300

Hi,

Because my ProgrammaticLogin was realized on the Server side today I try
with Client side. Unfortunately the result was the same. Is there any
working way for ProgrammaticLogin and Swing RMI client?


Regards,
Miro.

Miroslav Nachev wrote:
> 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.
>