fixed bug on first publishing

master
Lucio Lelii 2 years ago
parent 7e00459e9a
commit b9e2298ca9

@ -117,7 +117,7 @@ public class ApplicationProfileManager extends ApplicationLifecycleHandler {
//if we've failed before first publication do not try to publish
//(we may well have failed there)
if (context.properties().contains(PUBLISHED_PROP)) {
if (!context.properties().contains(PUBLISHED_PROP)) {
log.info("publishing application for the first time");
context.properties().add(new Property(PUBLISHED_PROP, true));
if (context.lifecycle().state() != ApplicationState.failed) {

@ -104,7 +104,7 @@ public class ContainerProfileManager extends ContainerHandler {
log.info("Publish after profile Change event called");
//if we've failed before first publication do not try to publish
//(we may well have failed there)
if (context.properties().contains(PUBLISHED_PROP)) {
if (!context.properties().contains(PUBLISHED_PROP)) {
context.properties().add(new Property(PUBLISHED_PROP, true));
log.info("publishing container for the first time");
if (context.lifecycle().state() != ContainerState.failed) {
@ -126,6 +126,7 @@ public class ContainerProfileManager extends ContainerHandler {
log.error("cannot publish container with publisher type {} (see details)", p.getClass().getCanonicalName(), e);
}
});
}
@Observes(value = addToContext)

Loading…
Cancel
Save