geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r292667 - /geronimo/trunk/modules/client/src/java/org/apache/geronimo/client/AppClientContainer.java
Date Fri, 30 Sep 2005 07:56:01 GMT
Author: djencks
Date: Fri Sep 30 00:56:00 2005
New Revision: 292667

URL: http://svn.apache.org/viewcvs?rev=292667&view=rev
Log:
Make it more obvious why a login failed

Modified:
    geronimo/trunk/modules/client/src/java/org/apache/geronimo/client/AppClientContainer.java

Modified: geronimo/trunk/modules/client/src/java/org/apache/geronimo/client/AppClientContainer.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/client/src/java/org/apache/geronimo/client/AppClientContainer.java?rev=292667&r1=292666&r2=292667&view=diff
==============================================================================
--- geronimo/trunk/modules/client/src/java/org/apache/geronimo/client/AppClientContainer.java
(original)
+++ geronimo/trunk/modules/client/src/java/org/apache/geronimo/client/AppClientContainer.java
Fri Sep 30 00:56:00 2005
@@ -23,6 +23,7 @@
 import javax.management.ObjectName;
 import javax.security.auth.Subject;
 import javax.security.auth.login.LoginContext;
+import javax.security.auth.login.LoginException;
 import javax.security.auth.callback.CallbackHandler;
 
 import org.apache.geronimo.gbean.GBeanInfo;
@@ -127,7 +128,12 @@
                     callbackHandler = (CallbackHandler) callbackHandlerClass.newInstance();
                 }
                 loginContext = new LoginContext(realmName, callbackHandler);
-                loginContext.login();
+                try {
+                    loginContext.login();
+                } catch (LoginException e) {
+                    loginContext = null;
+                    throw e;
+                }
                 clientSubject = loginContext.getSubject();
             }
             ContextManager.setCurrentCaller(clientSubject);



Mime
View raw message