Repository: stratos Updated Branches: refs/heads/4.0.0-grouping 5dae422f1 -> 297864957
adding a debug log to print all states transitioned Project: http://git-wip-us.apache.org/repos/asf/stratos/repo Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/29786495 Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/29786495 Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/29786495 Branch: refs/heads/4.0.0-grouping Commit: 297864957c2bc7369a7edefc84ddf2513205f101 Parents: 5dae422 Author: Isuru Haththotuwa <[email protected]> Authored: Mon Oct 20 19:09:46 2014 +0530 Committer: Isuru Haththotuwa <[email protected]> Committed: Mon Oct 20 19:13:47 2014 +0530 ---------------------------------------------------------------------- .../domain/topology/lifecycle/LifeCycleStateManager.java | 9 +++++++++ 1 file changed, 9 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/stratos/blob/29786495/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/lifecycle/LifeCycleStateManager.java ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/lifecycle/LifeCycleStateManager.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/lifecycle/LifeCycleStateManager.java index edb4cb1..c52d7a2 100644 --- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/lifecycle/LifeCycleStateManager.java +++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/lifecycle/LifeCycleStateManager.java @@ -59,6 +59,15 @@ public class LifeCycleStateManager<T extends LifeCycleState> implements Serializ * @return true if transitioning for nextState from current state is valid, else false */ public boolean isStateTransitionValid (T nextState) { + if (log.isDebugEnabled()) { + // print all transitions till now + StringBuilder stateTransitions = new StringBuilder("Transitioned States: [ START --> "); + for (int i = 0 ; i < stateStack.size() ; i++) { + stateTransitions.append(stateStack.get(i) + " --> "); + } + stateTransitions.append(" END ]"); + log.debug(stateTransitions); + } return stateStack.peek().getNextStates().contains(nextState); }
