The AWT actions happen in another thread so you end up with two call stacks.
Consider chainging to something like:
| public Object authenticationAdvice(Invocation inv) throws Throwable
| {
| this.invocation = inv;
| System.out.print("authentication advice: ");
|
| if (inv instanceof MethodInvocation) {
| MethodInvocation mi = (MethodInvocation)inv;
| show_login_form("Please sign in.");
| }
|
| synchronized(this)
| {
| this.wait();
| }
| return invocation.invokeNext();
| }
|
| private void show_login_form(String message) {
| LoginFrame loginDialog = new LoginFrame(this, message);
| loginDialog.setVisible(true);
| }
|
| //callback method for login dialog
| public void authenticate(String userName,String passwd) throws
Throwable {
| System.out.println("authenticating");
| }
|
| public void actionPerformed(ActionEvent arg0) {
| try {
| thisDialog.setVisible(false);
| thisDialog.setEnabled(false);
| //make call back to security interceptor
| securityInterceptor.authenticate(noNull(userName.getText()),
noNull(password.getText()));
|
| synchronized(securityInterceptor)
| {
| securityInterceptor.notify();
| }
|
| } catch (Throwable e) {
| e.printStackTrace();
| }
| }
|
Why this works in the optimized mode, I am not sure
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3932572#3932572
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3932572
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user