Skip to content

Commit 72f5d51

Browse files
committed
Using default addr for cases when domain was not yet completely started
Signed-off-by: David Matějček <[email protected]>
1 parent 0efaa06 commit 72f5d51

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

nucleus/admin/server-mgmt/src/main/java/com/sun/enterprise/admin/servermgmt/cli/ListDomainsCommand.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727

2828
import java.io.File;
2929
import java.util.List;
30+
import java.util.logging.Level;
3031

3132
import org.glassfish.api.Param;
3233
import org.glassfish.api.admin.CommandException;
@@ -111,7 +112,7 @@ private DomainInfo getStatus(String domainName) throws CommandException {
111112
info.statusMsg = strings.get("list.domains.StatusRestartRequired", domainName);
112113
}
113114
} catch (Exception e) {
114-
throw new IllegalStateException("KABOOM!", e);
115+
logger.log(Level.WARNING, "Failed to check domain status for " + domainName, e);
115116
}
116117
}
117118
return info;

nucleus/admin/server-mgmt/src/main/java/com/sun/enterprise/admin/servermgmt/cli/StopDomainCommand.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,9 @@ protected int executeCommand() throws CommandException {
101101
return dasNotRunning();
102102
}
103103

104-
// cmd line has higher priority, but if not set, use domain.xml or defaults
105104
addr = getReachableAdminAddress(getDomainXml());
106105
if (addr == null) {
107-
return dasNotRunning();
106+
addr = getUserProvidedAdminAddress();
108107
}
109108
programOpts.setHostAndPort(addr);
110109
LOG.log(Level.INFO, "Stopping local domain on admin endpoint {0}", addr);

0 commit comments

Comments
 (0)