You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Adam X <vb...@gmail.com> on 2016/09/08 11:57:52 UTC
tapestry-cdi veto resolution
Hi Guys, Hello Tapestry,
I've noticed that tapestry-cdi rather aggresively protects tapestry
managed beans from CDI beans. When I introduced my CDI managed JAR
which also had its own components, tapestry-cdi vetoed it.
For example, consiter Tap5 app root is:
com.foo.bar
And some CDI enabled JAR library contains beans in:
com.foo.vodoo.components
tapestry-cdi will veto all beans from that JAR even though there is no
way for namespace collision to occur.
Since I can't modify package structure in my JAR, I modified
tapestry-cdi to be less aggressive. Attached is the patch as well as
the complete source file. Feel free to commit/improve or whatever.
In this path, I took a rather naive (but safe, imo) approach to pass
app root via -D and be less aggressive if detected. If there is a way
to automatically detect it within the extension, then this could be
even simplier. In any case, it's tested and works like a charm in my
project.
Regards,
Adam