-
1. Re: No Proxy for Dependent Scoped Bean when loaded from a JAR
alesj Jul 3, 2012 7:04 PM (in response to ora)Since you already have this as an Arquillian test,
can you somehow port it to our Weld Arquillian tests, and do a pull-request?
-
2. Re: No Proxy for Dependent Scoped Bean when loaded from a JAR
ora Jul 4, 2012 3:26 AM (in response to alesj)I don't think I can, at least I don't know how, because I need two projects to reproduce the problem.
I can only reproduce it, if I load the class of the dependentscoped bean from a jar.
If I include it in the same project (or to be more correct, package it as class not as lib in the arquillian-test) it works.
btw: on weld-se it works in all scenarios
-
3. Re: No Proxy for Dependent Scoped Bean when loaded from a JAR
ora Jul 4, 2012 8:00 AM (in response to alesj)I think I've got the explanation. It seems I had a misunderstanding of activating interceptors.
I thought, I could activate the interceptor for the whole application (all archives in the war) in the beans.xml of the webarchive itself. But http://docs.jboss.org/weld/reference/1.1.0.Final/en-US/html_single/#d0e3556 states:
So I've put the interceptor-activation to the Eclipse Project A and magic, now I've got a proxy and the interceptor is running in Project B.
One general point is not clear to me. If I want my Project A to be a shared library which is executed in an application X with interceptor and an application Y without an interceptor, how can I do this easily?
The approach to activate the interceptor in the WAR is obviously not working.
Another approach would be to work with another annotation instead of the interceptor-binding-annotation and link the two with an extension in application X. Is this the easies way to do this?