JAAS Control flow question.

Hi All,

I have tried a very simple jaas example.

The over all client program flow is something like this::

LoginContext ctx =new LoginContext("MyLoginModule",new MyCallbackHandler());

.

.

.

System.out.println("Before Login");

ctx.login();

If my understanding goes right (Correct me if I am wrong)

Whe we try to create a LoginContext with the parameterized constructor:

LoginContext(String name222, CallbackHandler callbackHandler)

the following happens::

1. The LoginModule with name MyLoginModule(read from configuration file) is

a. Instatiated by calling default constructor.

b. Then the initialize method of MyLoginModule is called

2. The System.out.println("Before Login");

is executed

3. The login method of MyLoginModule is called.

My PROBLEM

-

Currently when my code runs the output in the console is of following order:

1.Before Login is printed (by the SOP [System.Out.Println])

2. SOPs in Constructor for MyLoginModule is printed(I have added it to check control flow)

3.SOPs in initialize method of MyLoginModule is printed

4 SOPs in login method of MyLoginModule is printed

Can any one please suggest what could have gone wrong with my code?

My authentication is working properly, but I wanted to know the actual flow..

Any suggestions will be highly appreciated.

[1595 byte] By [ayusman_dikshita] at [2007-10-3 8:13:15]
# 1
this is a really wild idea, but try running your code with -Djava.compiler=NONE
dberanskya at 2007-7-15 3:18:00 > top of Java-index,Java Essentials,Java Programming...
# 2
No it does not work... :-(Any other ideas..
ayusman_dikshita at 2007-7-15 3:18:00 > top of Java-index,Java Essentials,Java Programming...