geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ammul...@apache.org
Subject svn commit: rev 56645 - geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/plugin/factories
Date Fri, 05 Nov 2004 04:12:31 GMT
Author: ammulder
Date: Thu Nov  4 20:12:30 2004
New Revision: 56645

Added:
   geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/plugin/factories/AuthenticationFailedException.java
Modified:
   geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/plugin/factories/DeploymentFactoryImpl.java
Log:
Throw the proper exception type for authentication failure (JIRA 441)


Added: geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/plugin/factories/AuthenticationFailedException.java
==============================================================================
--- (empty file)
+++ geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/plugin/factories/AuthenticationFailedException.java
Thu Nov  4 20:12:30 2004
@@ -0,0 +1,15 @@
+package org.apache.geronimo.deployment.plugin.factories;
+
+import javax.enterprise.deploy.spi.exceptions.DeploymentManagerCreationException;
+
+/**
+ * A Geronimo-specific DeploymentManagerCreationException indicating that
+ * there was a login failure.
+ * 
+ * @version $Revision 1.0 $
+ */
+public class AuthenticationFailedException extends DeploymentManagerCreationException {
+    public AuthenticationFailedException(String s) {
+        super(s);
+    }
+}

Modified: geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/plugin/factories/DeploymentFactoryImpl.java
==============================================================================
--- geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/plugin/factories/DeploymentFactoryImpl.java
(original)
+++ geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/plugin/factories/DeploymentFactoryImpl.java
Thu Nov  4 20:12:30 2004
@@ -92,6 +92,8 @@
                     return manager;
                 } catch (IOException e) {
                     throw (DeploymentManagerCreationException)new DeploymentManagerCreationException(e.getMessage()).initCause(e);
+                } catch (SecurityException e) {
+                    throw new AuthenticationFailedException("Invalid login.");
                 }
             } else {
                 throw new DeploymentManagerCreationException("Invalid URI: " + uri);

Mime
View raw message