-
Bug
-
Resolution: Not a Bug
-
Major
-
None
-
3.0.4.Final
-
None
In Weblogic 12.2.1.3 with Weld 2.4, AroundInvoke interceptor methods doesn't apply to mdb methods called by container, but in Weblogic 12.3.1.0, it intercepts them, the case is like:
>>>>
package com.xo.svlt27891072;
...
@MessageDriven(mappedName = "jms/Queue", activationConfig = {
@ActivationConfigProperty(propertyName = "destinationType",
propertyValue = "javax.jms.Queue")
})
@Intcp
public class Mdb27891072 implements MessageDrivenBean, MessageListener {
private MessageDrivenContext mdc;
public Mdb27891072() {}
public void setMessageDrivenContext(MessageDrivenContext mdc)
...
}
package com.xo.svlt27891072;
...
@Interceptor
@Intcp
public class Intcp27891072 implements Serializable {
@AroundInvoke
public Object aroundInvoke(InvocationContext ic) throws Exception
}
<<<<
Here setMessageDrivenContext() is called by container, in wls12213 (Weld2.4.2), it only prints:
<<<<
-
-
- setMessageDrivenContext() ***
<<<<
- setMessageDrivenContext() ***
-
But in wls12310 (Weld 3.0.4), in prints:
>>>>
-
-
- invoke setMessageDrivenContext ***
- setMessageDrivenContext() ***
<<<<
-
This means setMessageDrivenContext() is intercepted, and relevant stack trace looks like:
>>>>
aroundInvoke:15, Intcp27891072
invoke0:-1, NativeMethodAccessorImpl {sun.reflect}
invoke:62, NativeMethodAccessorImpl {sun.reflect}
invoke:43, DelegatingMethodAccessorImpl {sun.reflect}
invoke:498, Method {java.lang.reflect}
invoke:73, SimpleInterceptorInvocation$SimpleMethodInvocation {org.jboss.weld.interceptor.reader}
executeAroundInvoke:84, InterceptorMethodHandler {org.jboss.weld.interceptor.proxy}
executeInterception:72, InterceptorMethodHandler{org.jboss.weld.interceptor.proxy}
invoke:56, InterceptorMethodHandler {org.jboss.weld.interceptor.proxy}
invoke:79, CombinedInterceptorAndDecoratorStackMethodHandler {org.jboss.weld.bean.proxy}
invoke:68, CombinedInterceptorAndDecoratorStackMethodHandler{org.jboss.weld.bean.proxy}
setMessageDrivenContext:-1, Mdb27891072$Proxy$_$$_WeldSubclass{com.xo.svlt27891072}
<<<<
They are all in weld code and doesn't relate to Weblogic.
So Is this behavior change a defect or, it references to specification?
Thanks.
- relates to
-
WELD-2594 Message Driven Bean's around invoke interceptor invoked twice
- Resolved