Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,6 @@ class GFEmbeddedLauncher extends GFLauncher {

}

@Override
void internalLaunch() throws GFLauncherException {
try {
launchInstance();
} catch (Exception ex) {
throw new GFLauncherException(ex);
}
}

@Override
List<File> getMainModulepath() throws GFLauncherException {
return List.of();
Expand Down Expand Up @@ -104,8 +95,8 @@ public void setup() throws GFLauncherException, MiniXmlParserException {
setup = true;
try {
setupFromEnv();
} catch (GFLauncherException gfle) {
throw new GFLauncherException(GENERAL_MESSAGE + gfle.getMessage(), gfle);
} catch (GFLauncherException e) {
throw new GFLauncherException(GENERAL_MESSAGE + e.getMessage(), e);
}

initCommandLine();
Expand All @@ -128,12 +119,14 @@ public void setup() throws GFLauncherException, MiniXmlParserException {

File dom = new File(parent, domainName);
File theConfigDir = new File(dom, "config");
File dx = new File(theConfigDir, "domain.xml");
File domainXmlFile = new File(theConfigDir, "domain.xml");
info.setConfigDir(theConfigDir);

info.setDomainRootDir(new File(System.getenv(INSTALL_HOME)));
MiniXmlParser parser = new MiniXmlParser(dx, instanceName);
info.setAdminAddresses(parser.getAdminAddresses());
MiniXmlParser parser = new MiniXmlParser(domainXmlFile, instanceName);
List<HostAndPort> adminAddresses = parser.getAdminAddresses();
info.setAsadminAdminAddress(new HostAndPort("localhost", 4848, false));
info.setXmlAdminAddresses(adminAddresses);
File logFile = new File(dom, "logs");
logFile = new File(logFile, "server.log");
logFilename = logFile.getAbsolutePath();
Expand All @@ -143,25 +136,11 @@ public void setup() throws GFLauncherException, MiniXmlParserException {
e.printStackTrace();
}

List<HostAndPort> adminAddresses = info.getAdminAddresses();

if (adminAddresses == null || adminAddresses.isEmpty()) {
adminAddresses = new ArrayList<>();
adminAddresses.add(new HostAndPort("localhost", 4848, false));
info.setAdminAddresses(adminAddresses);
}
GFLauncherLogger.addLogFileHandler(getLogFilename());

// super.fixLogFilename();

/*
* String domainName = parser.getDomainName(); if(GFLauncherUtils.ok(domainName)) { info.setDomainName(domainName); }
*/

}

@Override
public String getLogFilename() throws GFLauncherException {
public String getLogFilename() {
return logFilename;
}

Expand Down
Loading