ARTEMIS-5201 when non embedded use exit(1) on exception for artemis cli main like artemis boot

This commit is contained in:
Gary Tully 2024-12-06 12:30:31 +00:00 committed by Justin Bertram
parent 33d2eec7f0
commit ea2b80d79e
2 changed files with 8 additions and 1 deletions

View File

@ -111,7 +111,10 @@ public class Artemis implements Runnable {
verifyManagementDTO(fileBrokerETC);
execute(true, true, true, fileHome, fileInstance, fileBrokerETC, args);
Object result = execute(true, true, true, fileHome, fileInstance, fileBrokerETC, args);
if (!Run.getEmbedded() && result instanceof Exception) {
System.exit(1);
}
}

View File

@ -70,6 +70,10 @@ public class Run extends LockAbstract {
Run.embedded = true;
}
public static boolean getEmbedded() {
return Run.embedded;
}
private Broker server;
@Override