diff --git a/portlet/src/main/java/org/gatein/pc/portlet/container/managed/ManagedObject.java b/portlet/src/main/java/org/gatein/pc/portlet/container/managed/ManagedObject.java index 5d7bc326..8c28130d 100644 --- a/portlet/src/main/java/org/gatein/pc/portlet/container/managed/ManagedObject.java +++ b/portlet/src/main/java/org/gatein/pc/portlet/container/managed/ManagedObject.java @@ -43,20 +43,6 @@ public interface ManagedObject */ Throwable getFailure(); - /** - * Attempt to promote the managed object. - * - * @throws IllegalStateException when reentrency is detected - */ - void promote(LifeCycleStatus to) throws IllegalStateException; - - /** - * Attempt to demote the managed object. - * - * @throws IllegalStateException when reentrency is detected - */ - void demote(LifeCycleStatus to) throws IllegalStateException; - /** * Attempt to start the managed object, same as calling promote(LifeCycleStatus.STARTED). * diff --git a/portlet/src/main/java/org/gatein/pc/portlet/impl/container/LifeCycle.java b/portlet/src/main/java/org/gatein/pc/portlet/impl/container/LifeCycle.java index e5fc2e23..4d8bb1bb 100644 --- a/portlet/src/main/java/org/gatein/pc/portlet/impl/container/LifeCycle.java +++ b/portlet/src/main/java/org/gatein/pc/portlet/impl/container/LifeCycle.java @@ -72,8 +72,12 @@ public final void managedStart() throws IllegalStateException promote(LifeCycleStatus.STARTED); } - @Override - public final synchronized void promote(LifeCycleStatus to) throws IllegalStateException + /** + * Attempt to promote the managed object. + * + * @throws IllegalStateException when reentrency is detected + */ + final synchronized void promote(LifeCycleStatus to) throws IllegalStateException { if (active) { @@ -194,7 +198,12 @@ public final void managedDestroy() demote(LifeCycleStatus.INITIALIZED); } - public final synchronized void demote(LifeCycleStatus to) throws IllegalStateException + /** + * Attempt to demote the managed object. + * + * @throws IllegalStateException when reentrency is detected + */ + final synchronized void demote(LifeCycleStatus to) throws IllegalStateException { if (active) {