geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r292668 - /geronimo/branches/1.0-M5/modules/client/src/java/org/apache/geronimo/client/AppClientContainer.java
Date Fri, 30 Sep 2005 07:57:12 GMT
Author: djencks
Date: Fri Sep 30 00:57:11 2005
New Revision: 292668

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

Modified:
    geronimo/branches/1.0-M5/modules/client/src/java/org/apache/geronimo/client/AppClientContainer.java

Modified: geronimo/branches/1.0-M5/modules/client/src/java/org/apache/geronimo/client/AppClientContainer.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.0-M5/modules/client/src/java/org/apache/geronimo/client/AppClientContainer.java?rev=292668&r1=292667&r2=292668&view=diff
==============================================================================
--- geronimo/branches/1.0-M5/modules/client/src/java/org/apache/geronimo/client/AppClientContainer.java
(original)
+++ geronimo/branches/1.0-M5/modules/client/src/java/org/apache/geronimo/client/AppClientContainer.java
Fri Sep 30 00:57:11 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