geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xuhaih...@apache.org
Subject svn commit: r1032466 - /geronimo/server/trunk/framework/modules/geronimo-shell-base/src/main/java/org/apache/geronimo/shell/deploy/LoginCommand.java
Date Mon, 08 Nov 2010 06:07:24 GMT
Author: xuhaihong
Date: Mon Nov  8 06:07:23 2010
New Revision: 1032466

URL: http://svn.apache.org/viewvc?rev=1032466&view=rev
Log:
GERONIMO-5613 Check whether current connection is of OfflineServerConnection to determine
whether the embedded mode is used.

Modified:
    geronimo/server/trunk/framework/modules/geronimo-shell-base/src/main/java/org/apache/geronimo/shell/deploy/LoginCommand.java

Modified: geronimo/server/trunk/framework/modules/geronimo-shell-base/src/main/java/org/apache/geronimo/shell/deploy/LoginCommand.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-shell-base/src/main/java/org/apache/geronimo/shell/deploy/LoginCommand.java?rev=1032466&r1=1032465&r2=1032466&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-shell-base/src/main/java/org/apache/geronimo/shell/deploy/LoginCommand.java
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-shell-base/src/main/java/org/apache/geronimo/shell/deploy/LoginCommand.java
Mon Nov  8 06:07:23 2010
@@ -23,6 +23,7 @@ import org.apache.felix.gogo.commands.Co
 import org.apache.geronimo.cli.deployer.BaseCommandArgs;
 import org.apache.geronimo.deployment.cli.AbstractCommand;
 import org.apache.geronimo.deployment.cli.CommandLogin;
+import org.apache.geronimo.deployment.cli.OfflineServerConnection;
 import org.apache.geronimo.deployment.cli.ServerConnection;
 
 /**
@@ -33,12 +34,13 @@ public class LoginCommand extends Connec
 
     @Override
     protected Object doExecute() throws Exception {
-        if (isEmbedded()) {
+
+        ServerConnection connection = connect();
+
+        if (connection instanceof OfflineServerConnection) {
             println("No credentials to save in embedded mode.");
             return null;
         }
-        
-        ServerConnection connection = connect();
 
         AbstractCommand command = new CommandLogin();
 



Mime
View raw message