File tree 2 files changed +8
-2
lines changed
impl/src/main/java/org/jboss/weld
2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 31
31
import javax .enterprise .context .spi .CreationalContext ;
32
32
33
33
import org .jboss .weld .Container ;
34
+ import org .jboss .weld .bootstrap .api .ServiceRegistry ;
34
35
import org .jboss .weld .context .api .ContextualInstance ;
35
36
import org .jboss .weld .context .beanstore .BeanStore ;
36
37
import org .jboss .weld .exceptions .IllegalArgumentException ;
@@ -59,6 +60,8 @@ public abstract class AbstractContext implements Context
59
60
60
61
private final boolean multithreaded ;
61
62
63
+ private static final ServiceRegistry CACHED_SERVICE_REGISTRY = Container .instance ().services ();
64
+
62
65
/**
63
66
* Constructor
64
67
*
@@ -192,7 +195,7 @@ protected static <T> Contextual<T> getContextual(String id)
192
195
193
196
protected static String getId (Contextual <?> contextual )
194
197
{
195
- return Container . instance (). services () .get (ContextualStore .class ).putIfAbsent (contextual );
198
+ return CACHED_SERVICE_REGISTRY .get (ContextualStore .class ).putIfAbsent (contextual );
196
199
}
197
200
198
201
}
Original file line number Diff line number Diff line change 39
39
import org .jboss .weld .context .http .HttpRequestContext ;
40
40
import org .jboss .weld .context .http .HttpSessionContext ;
41
41
import org .jboss .weld .exceptions .IllegalStateException ;
42
+ import org .jboss .weld .manager .BeanManagerImpl ;
42
43
import org .jboss .weld .servlet .api .helpers .AbstractServletListener ;
43
44
import org .slf4j .cal10n .LocLogger ;
44
45
@@ -57,6 +58,8 @@ public class WeldListener extends AbstractServletListener
57
58
58
59
private static final LocLogger log = loggerFactory ().getLogger (SERVLET );
59
60
61
+ private static final BeanManagerImpl CACHED_BEAN_MANAGER = Container .instance ().deploymentManager ();
62
+
60
63
@ Override
61
64
public void sessionDestroyed (HttpSessionEvent event )
62
65
{
@@ -147,7 +150,7 @@ public void requestInitialized(ServletRequestEvent event)
147
150
148
151
private static Instance <Context > instance ()
149
152
{
150
- return Container . instance (). deploymentManager () .instance ().select (Context .class );
153
+ return CACHED_BEAN_MANAGER .instance ().select (Context .class );
151
154
}
152
155
153
156
}
You can’t perform that action at this time.
0 commit comments