fixed bug on first publishing
This commit is contained in:
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
|
//if we've failed before first publication do not try to publish
|
||||||
//(we may well have failed there)
|
//(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");
|
log.info("publishing application for the first time");
|
||||||
context.properties().add(new Property(PUBLISHED_PROP, true));
|
context.properties().add(new Property(PUBLISHED_PROP, true));
|
||||||
if (context.lifecycle().state() != ApplicationState.failed) {
|
if (context.lifecycle().state() != ApplicationState.failed) {
|
||||||
|
|
|
@ -104,7 +104,7 @@ public class ContainerProfileManager extends ContainerHandler {
|
||||||
log.info("Publish after profile Change event called");
|
log.info("Publish after profile Change event called");
|
||||||
//if we've failed before first publication do not try to publish
|
//if we've failed before first publication do not try to publish
|
||||||
//(we may well have failed there)
|
//(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));
|
context.properties().add(new Property(PUBLISHED_PROP, true));
|
||||||
log.info("publishing container for the first time");
|
log.info("publishing container for the first time");
|
||||||
if (context.lifecycle().state() != ContainerState.failed) {
|
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);
|
log.error("cannot publish container with publisher type {} (see details)", p.getClass().getCanonicalName(), e);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Observes(value = addToContext)
|
@Observes(value = addToContext)
|
||||||
|
|
Loading…
Reference in New Issue