cancel
Showing results for 
Search instead for 
Did you mean: 

JAAS - odd life cycle

former_member190457
Contributor
0 Kudos

Hi everybody

I have developed a JAAS login module for j2ee engine 7.0.

The module behaves properly until login() is executed, but afterwards the whole java module object is discarded(or "killed") by the java runtime. No exception is thrown, it just disappears from the NWDS debugger view.

What's worse, when logout() is executed, the module is re-instanciated and of course re-initialized: as it is a completely new module object, the internal state is lost!

Has anyone ever faced this issue before?

Thanks a lot

Point will be awarded

Vincenzo

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Vincenzo,

This is not a problem. It is as per JAAS specification.

The JAAS infrastructure executes login() methods of all the LMs in the stack and then the submit() methods. Depending on LMs result (true|false|exception), the user is logged in or not.

When the procedure is done, the LM instances are free for the Garbage Collector.

When logout() is called, new LM instances are created and logout() is invoked.

Kind regards,

Tsvetomir

Answers (0)