Author: covener
Date: Wed Sep 8 13:50:47 2010
New Revision: 995059
URL: http://svn.apache.org/viewvc?rev=995059&view=rev
Log:
[OWB-451] allow InterceptorUtil to pass along a "CreationalContext key"
to the InvocationContext it creates.
Modified:
openwebbeans/trunk/webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/interceptor/OpenWebBeansEjbInterceptor.java
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorUtil.java
Modified:
openwebbeans/trunk/webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/interceptor/OpenWebBeansEjbInterceptor.java
URL:
http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/interceptor/OpenWebBeansEjbInterceptor.java?rev=995059&r1=995058&r2=995059&view=diff
==============================================================================
---
openwebbeans/trunk/webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/interceptor/OpenWebBeansEjbInterceptor.java
(original)
+++
openwebbeans/trunk/webbeans-ejb/src/main/java/org/apache/webbeans/ejb/common/interceptor/OpenWebBeansEjbInterceptor.java
Wed Sep 8 13:50:47 2010
@@ -546,8 +546,10 @@ public class OpenWebBeansEjbInterceptor
if
(WebBeansUtil.isContainsInterceptorMethod(filteredInterceptorStack,
InterceptorType.AROUND_INVOKE))
{
rv.INTERCEPTOR_OR_DECORATOR_CALL = true;
- rv.RETURN_VALUE =
InterceptorUtil.callAroundInvokes(threadLocal.get(), instance,
(CreationalContextImpl<?>)threadLocalCreationalContext.get(), method,
- arguments,
InterceptorUtil.getInterceptorMethods(filteredInterceptorStack,
InterceptorType.AROUND_INVOKE), ejbContext);
+ rv.RETURN_VALUE =
InterceptorUtil.callAroundInvokes(threadLocal.get(), instance,
+
(CreationalContextImpl<?>)threadLocalCreationalContext.get(), method,
arguments,
+
InterceptorUtil.getInterceptorMethods(filteredInterceptorStack,
InterceptorType.AROUND_INVOKE),
+ ejbContext, null);
return rv;
}
@@ -589,9 +591,10 @@ public class OpenWebBeansEjbInterceptor
if
(WebBeansUtil.isContainsInterceptorMethod(this.nonCtxInterceptedMethodMap.get(method),
InterceptorType.AROUND_INVOKE))
{
rv.INTERCEPTOR_OR_DECORATOR_CALL = true;
- rv.RETURN_VALUE = InterceptorUtil.callAroundInvokes(bean,
instance, (CreationalContextImpl<?>)creationalContext, method,
- arguments,
InterceptorUtil.getInterceptorMethods(this.nonCtxInterceptedMethodMap.get(method),
InterceptorType.AROUND_INVOKE),
- ejbContext);
+ rv.RETURN_VALUE = InterceptorUtil.callAroundInvokes(bean,
instance,
+ (CreationalContextImpl<?>)creationalContext, method,
arguments,
+
InterceptorUtil.getInterceptorMethods(this.nonCtxInterceptedMethodMap.get(method),
InterceptorType.AROUND_INVOKE),
+ ejbContext, null);
return rv;
}
Modified:
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorUtil.java
URL:
http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorUtil.java?rev=995059&r1=995058&r2=995059&view=diff
==============================================================================
---
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorUtil.java
(original)
+++
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/InterceptorUtil.java
Wed Sep 8 13:50:47 2010
@@ -544,7 +544,7 @@ public final class InterceptorUtil
}
public static Object callAroundInvokes(InjectionTargetBean<?> bean,Object
instance, CreationalContextImpl<?> creationalContext,
- Method proceed, Object[] arguments, List<InterceptorData> stack,
InvocationContext ejbInvocationContext) throws Exception
+ Method proceed, Object[] arguments, List<InterceptorData> stack,
InvocationContext ejbInvocationContext, Object altKey) throws Exception
{
InvocationContextImpl impl = new InvocationContextImpl(bean, instance,
proceed,
arguments, stack, InterceptorType.AROUND_INVOKE);
@@ -553,6 +553,11 @@ public final class InterceptorUtil
impl.setEJBInvocationContext(ejbInvocationContext);
}
+ if (altKey != null)
+ {
+ impl.setCcKey(altKey);
+ }
+
impl.setCreationalContext(creationalContext);
return impl.proceed();