diff --git a/impl/core/src/main/java/br/gov/frameworkdemoiselle/internal/implementation/Management.java b/impl/core/src/main/java/br/gov/frameworkdemoiselle/internal/implementation/Management.java index 5904403..f2cb73e 100644 --- a/impl/core/src/main/java/br/gov/frameworkdemoiselle/internal/implementation/Management.java +++ b/impl/core/src/main/java/br/gov/frameworkdemoiselle/internal/implementation/Management.java @@ -57,8 +57,6 @@ import br.gov.frameworkdemoiselle.annotation.ManagedProperty; import br.gov.frameworkdemoiselle.annotation.Name; import br.gov.frameworkdemoiselle.context.ConversationContext; import br.gov.frameworkdemoiselle.context.RequestContext; -import br.gov.frameworkdemoiselle.context.SessionContext; -import br.gov.frameworkdemoiselle.context.ViewContext; import br.gov.frameworkdemoiselle.internal.implementation.ManagedType.MethodDetail; import br.gov.frameworkdemoiselle.management.AttributeChangeMessage; import br.gov.frameworkdemoiselle.management.DefaultNotification; @@ -307,10 +305,7 @@ public class Management implements Serializable { } private void activateContexts(Class managedType) { - RequestContext requestContext = Beans.getReference(RequestContext.class); - ViewContext viewContext = Beans.getReference(ViewContext.class); - SessionContext sessionContext = Beans.getReference(SessionContext.class); ConversationContext conversationContext = Beans.getReference(ConversationContext.class); if (!requestContext.isActive()){ @@ -320,20 +315,6 @@ public class Management implements Serializable { requestContext.activate(); } - if (!viewContext.isActive()){ - logger.debug(bundle.getString("management-debug-starting-custom-context", - viewContext.getClass().getCanonicalName(), managedType.getCanonicalName())); - - viewContext.activate(); - } - - if (!sessionContext.isActive()){ - logger.debug(bundle.getString("management-debug-starting-custom-context", - sessionContext.getClass().getCanonicalName(), managedType.getCanonicalName())); - - sessionContext.activate(); - } - if (!conversationContext.isActive()){ logger.debug(bundle.getString("management-debug-starting-custom-context", conversationContext.getClass().getCanonicalName(), managedType.getCanonicalName())); @@ -344,8 +325,6 @@ public class Management implements Serializable { private void deactivateContexts(Class managedType) { RequestContext requestContext = Beans.getReference(RequestContext.class); - ViewContext viewContext = Beans.getReference(ViewContext.class); - SessionContext sessionContext = Beans.getReference(SessionContext.class); ConversationContext conversationContext = Beans.getReference(ConversationContext.class); if (requestContext.isActive()){ @@ -355,25 +334,11 @@ public class Management implements Serializable { requestContext.deactivate(); } - if (!viewContext.isActive()){ + if (conversationContext.isActive()){ logger.debug(bundle.getString("management-debug-stoping-custom-context", - viewContext.getClass().getCanonicalName(), managedType.getCanonicalName())); - - viewContext.deactivate(); - } - - if (!sessionContext.isActive()){ - logger.debug(bundle.getString("management-debug-stoping-custom-context", - sessionContext.getClass().getCanonicalName(), managedType.getCanonicalName())); - - sessionContext.deactivate(); - } - - if (!conversationContext.isActive()){ - logger.debug(bundle.getString("management-debug-starting-custom-context", conversationContext.getClass().getCanonicalName(), managedType.getCanonicalName())); - conversationContext.activate(); + conversationContext.deactivate(); } } -- libgit2 0.21.2