[weld-issues] [JBoss JIRA] (WELD-1110) Should be able to Decorate EJB
Stuart Douglas (JIRA)
jira-events at lists.jboss.org
Sun Apr 22 20:33:18 EDT 2012
[ https://issues.jboss.org/browse/WELD-1110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12686357#comment-12686357 ]
Stuart Douglas commented on WELD-1110:
--------------------------------------
I looked into this, and it looks like it is a fairly serious problem in weld.
It looks like between the 800 odd TCK tests, 400 odd tests in the weld code base, and all the tests in the AS7 code base there is not a single test for EJB decorators.
For CDI invocations (i.e. EJB's that were obtained via @Inject or via the BM) it looks like decorators will be called, but in the wrong order. For non-CDI invocations it looks like decorators will simply be ignored.
I can't see any obvious way to fix this without an SPI change to weld, so we may not be able to address this in the 1.1 branch, although I am still thinking about possible solutions.
> Should be able to Decorate EJB
> ------------------------------
>
> Key: WELD-1110
> URL: https://issues.jboss.org/browse/WELD-1110
> Project: Weld
> Issue Type: Bug
> Components: Interceptors and Decorators
> Affects Versions: 1.1.5.Final
> Reporter: Aslak Knutsen
> Assignee: Marko Lukša
>
> Should be possible to Decorate a EJB
> {code}
> Caused by: org.jboss.weld.exceptions.CreationException: WELD-000079 Could not find the EJB in JNDI: class de.jax.demo.rest.MessageEndpoint$Proxy$_$$_Weld$Proxy$
> at org.jboss.weld.bean.SessionBean.create(SessionBean.java:306) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
> at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:107) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
> at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:90) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
> at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:79) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
> at de.jax.demo.rest.MessageEndpoint$Proxy$_$$_WeldClientProxy.listAll(MessageEndpoint$Proxy$_$$_WeldClientProxy.java) [classes:]
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_147-icedtea]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_147-icedtea]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_147-icedtea]
> at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_147-icedtea]
> at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:155) [resteasy-jaxrs-2.3.2.Final.jar:]
> at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:257) [resteasy-jaxrs-2.3.2.Final.jar:]
> at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:222) [resteasy-jaxrs-2.3.2.Final.jar:]
> at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:211) [resteasy-jaxrs-2.3.2.Final.jar:]
> at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:525) [resteasy-jaxrs-2.3.2.Final.jar:]
> ... 23 more
> Caused by: java.lang.NullPointerException
> at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:672) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
> at org.jboss.weld.bean.proxy.DecorationHelper.createMethodHandler(DecorationHelper.java:81) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
> at org.jboss.weld.bean.proxy.DecorationHelper.getNextDelegate(DecorationHelper.java:94) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
> at org.jboss.weld.bean.SessionBean.applyDecorators(SessionBean.java:319) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
> at org.jboss.weld.bean.SessionBean.create(SessionBean.java:298) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
> ... 36 more
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the weld-issues
mailing list