You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by rm...@apache.org on 2013/02/13 13:19:35 UTC
svn commit: r1445568 -
/tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiAppContextsService.java
Author: rmannibucau
Date: Wed Feb 13 12:19:35 2013
New Revision: 1445568
URL: http://svn.apache.org/r1445568
Log:
removing useless code from CdiAppContextsService
Modified:
tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiAppContextsService.java
Modified: tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiAppContextsService.java
URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiAppContextsService.java?rev=1445568&r1=1445567&r2=1445568&view=diff
==============================================================================
--- tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiAppContextsService.java (original)
+++ tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/cdi/CdiAppContextsService.java Wed Feb 13 12:19:35 2013
@@ -105,7 +105,7 @@ public class CdiAppContextsService exten
public void destroy(final Object destroyObject) {
//Destroy application context
endContext(ApplicationScoped.class, destroyObject);
-//
+
//Destroy singleton context
endContext(Singleton.class, destroyObject);
@@ -178,10 +178,11 @@ public class CdiAppContextsService exten
} else if (scopeType.equals(SessionScoped.class)) {
initSessionContext((HttpSession) startParameter);
} else if (scopeType.equals(ApplicationScoped.class)) {
+ // Do nothing
} else if (scopeType.equals(Dependent.class)) {
// Do nothing
} else if (scopeType.equals(Singleton.class)) {
- initSingletonContext();
+ // Do nothing
} else if (supportsConversation() && scopeType.equals(ConversationScoped.class)) {
initConversationContext((ConversationContext) startParameter);
} else {
@@ -206,7 +207,6 @@ public class CdiAppContextsService exten
}
private void initRequestContext(ServletRequestEvent event) {
-
RequestContext rq = new ServletRequestContext();
rq.setActive(true);
@@ -222,12 +222,6 @@ public class CdiAppContextsService exten
if (session != null) {
initSessionContext(session);
}
-
-// //Init thread local application context
-// initApplicationContext(event.getServletContext());
-//
-// //Init thread local sigleton context
-// initSingletonContext(event.getServletContext());
}
}
}
@@ -259,20 +253,6 @@ public class CdiAppContextsService exten
requestContext.set(null);
requestContext.remove();
- //Also clear application and singleton context
-// applicationContext.set(null);
-// applicationContext.remove();
-
- //Singleton context
-// singletonContext.set(null);
-// singletonContext.remove();
-
- //Conversation context
- if (null != conversationContext) {
- conversationContext.set(null);
- conversationContext.remove();
- }
-
RequestScopedBeanInterceptorHandler.removeThreadLocals();
}
@@ -378,9 +358,6 @@ public class CdiAppContextsService exten
applicationContext.destroy();
}
- private void initSingletonContext() {
- }
-
private void destroySingletonContext() {
singletonContext.destroy();
}
@@ -487,10 +464,13 @@ public class CdiAppContextsService exten
try {
HttpSession currentSession = servletRequest.getSession();
initSessionContext(currentSession);
-// if (failoverService != null && failoverService.isSupportFailOver())
-// {
-// failoverService.sessionIsInUse(currentSession);
-// }
+
+ /*
+ final FailOverService failoverService = webBeansContext.getService(FailOverService.class);
+ if (failoverService != null && failoverService.isSupportFailOver()) {
+ failoverService.sessionIsInUse(currentSession);
+ }
+ */
if (logger.isDebugEnabled()) {
logger.debug("Lazy SESSION context initialization SUCCESS");