I'm sorry that I have to ask again...
No problem.
Does / should adding a @Priority annotation already automatically enable the alternative?
Yes, it does and it should enable/select the alternative globally, ie. for the whole application.
I thought if I give the class to selectAlternatives...
Nope. These are two different ways of enabling alternatives: 1. beans.xml or SeContainerInitializer.selectAlternatives() - locally, per bean archive 2. @Priority - globally, for the application
Is there a way to achieve this...
Hm, probably not. Well, you can disable the discovery completely (SeContainerInitializer.disableDiscovery()) and use the synthetic bean archive only - SeContainerInitializer.selectAlternatives() would work in this case. |