hi oliver, cdi doesn't/can't allow that (because it's against the concept of alternative beans). an alternative bean means that you need a default one which gets replaced (but the type-info needs to be compatible).
if you don't have a default bean (e.g. because the task is done by the ee-server): just move your bean to the test-module (if it isn't there already) and remove @Alternative (+ the config in beans.xml). regards, gerhard http://www.irian.at Your JavaEE powerhouse - JavaEE Consulting, Development and Courses in English and German Professional Support for Apache MyFaces, DeltaSpike and OpenWebBeans 2015-12-09 11:33 GMT+01:00 Oliver Weise <[email protected]>: > Hi John, > > Sorry for the delay. Apparently I got the ways a mailing list works wrong > ;-) I'm now subscribed. > > My alternative actually does not extend anything. It is an alternative as > producer of the EntityManager. As far as I can tell this part is actually > working well when I'm also configuring my CompanyFacade to be an > alternative, like described. I can see then that my > TestEntityManagerProducer is actually used to retrieve the EntityManager. > > But if you think that default and alternative are obliged to > extend/implement some superclass/interface that will be the next thing I > will try this evening. It is just that this in itself does not really serve > a purpose, as the classes are just sharing the fact that they are > EntityManager producers. > > > Kind Regards, > Oliver Weise > >
