I was doing some playing around with defining components in seam, using the components.xml
to provide overrides, when I came across behavior I did not expect. What I am trying to do
is use the components.xml file to effectively "uninstall" a component, or to put
it in other terms, prevent the component from being installed.
Consider the case where you have a component (defined with the @Name annotation) that you
want to prevent from loading, perhaps in a unit test or another conditional runtime
scenario. You may think that you can do:
<component name="componentA" class="ComponentA"
installed="false" precedence="50" />
However, this doesn't work because it is interpreted as meaning that you do not want
to install this particular component definition. You are not overriding the installed flag
on the lower precedence component.
I wonder if there is some other way of "disabling" a component that is installed
by default. Perhaps a third value, never, could be added to the installed attribute. This
value would mean that you don't want to install this component and you don't want
to install the original component either.
Thoughts? Am I crazy for wanting to do this?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4064689#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...