[jboss-jira] [JBoss JIRA] (WFLY-4521) Deployment does not see / cannot access the cdi interceptor if the latter is loaded inside a module from a DUP.
Jozef Hartinger (JIRA)
issues at jboss.org
Thu Apr 16 08:46:19 EDT 2015
[ https://issues.jboss.org/browse/WFLY-4521?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13059663#comment-13059663 ]
Jozef Hartinger commented on WFLY-4521:
---------------------------------------
It's not a bug in WildFly but instead a problem of how you use WildFly. You bundle MetricsApi as a built-in module and also as a jar inside your war application. That means that the classes are loaded twice by two different classloaders (one for the built-in module, the other one for the deployment). In Java, if the same class is loaded by two different classloaders the resulting classes are not equal. Therefore, the intercepted EJB and the interceptor do not share the same binding.
Instead of this you should:
1) Alter the DUP to also add dependency on the API
2) Stop bundling the API jar with your deployment
> Deployment does not see / cannot access the cdi interceptor if the latter is loaded inside a module from a DUP.
> ----------------------------------------------------------------------------------------------------------------
>
> Key: WFLY-4521
> URL: https://issues.jboss.org/browse/WFLY-4521
> Project: WildFly
> Issue Type: Bug
> Components: CDI / Weld
> Affects Versions: 9.0.0.Beta2
> Reporter: Panagiotis Sotiropoulos
> Assignee: Jozef Hartinger
> Attachments: interceptorExample.jar, interceptorExample.zip
>
>
> The cdi interceptor is not accessible via the deployment, if it is loaded from a Deployment Unit Processor as a module.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
More information about the jboss-jira
mailing list