I'm trying to specialize an EJB. I have
package com.foo.core;
@Stateless
public class MyFacade { }
and
package com.foo.extension;
@Specializes
@Stateless
public class MyFacade extends com.foo.core.MyFacade { }
In my opinion, this should work, because the meaning of @Specializes is, that CDI should forget about the core-class and instead use the specialized class. I also found this bug https://issues.jboss.org/browse/WELD-1451 which indicates, that it is possible to specialize an EJB.
But if i try to deploy my application (I'm using Weblogic 12.1.3), I always get
weblogic.utils.ErrorCollectionException: There are 1 nested errors: weblogic.j2ee.dd.xml.AnnotationProcessException: Duplicate ejb name 'MyFacade' found: annotation 'Stateless' on bean class com.foo.core.MyFacade and annoation 'Stateless' on bean class com.foo.extension.MyFacade
Am I doing anything wrong?
Thanks!