Skip to content

Commit

Permalink
try to avoid creation of creationalContext every time we invoke a met…
Browse files Browse the repository at this point in the history
…hod on a client proxy.
  • Loading branch information
Ståle Pedersen authored and pmuir committed Nov 16, 2010
1 parent e7ed819 commit 9a3d972
Showing 1 changed file with 4 additions and 0 deletions.
Expand Up @@ -77,6 +77,10 @@ public T getInstance()
bean = CACHED_CONTAINER.services().get(ContextualStore.class).<Bean<T>, T>getContextual(id);
}
Context context = CACHED_CONTAINER.deploymentManager().getContext(bean.getScope());

if(context.get(bean) != null)
return context.get(bean);

WeldCreationalContext<T> creationalContext;
WeldCreationalContext<?> previousCreationalContext = currentCreationalContext.get();
if (currentCreationalContext.get() == null)
Expand Down

0 comments on commit 9a3d972

Please sign in to comment.