I am trying to exclude a Bean implementation using the DeltaSpike 1.0 @Exclude
-Annotation. The exclusion should be based on a property value like this:
@Exclude(onExpression = "providerimplementation!=mock")
I created a PropertyFileConfig
returning my .properties
file name to let DeltaSpike pick up the configured value and used this @Exclude
in two different implementing beans, each of them being excluded like above.
The configuration is included in an EAR as a .jar
file and both implementations sit in different .jar
files inside the EAR.
I am trying to deploy the whole archive onto a WebSphere 8.5.5 Server and on startup I get a javax.enterprise.inject.AmbiguousResolutionException
for the injection point.
It seems to me that the PropertyFileConfig
is not picked up before the expression resolution, although I found references to this kind of pattern (http://deltaspike.apache.org/core.html#exclude and https://groups.google.com/forum/#!topic/java-config/xsleMKST3rU), so I wonder what's wrong with my setup.