You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by am...@apache.org on 2004/11/05 05:12:31 UTC

svn commit: rev 56645 - geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/plugin/factories

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);