cdi - @Specializes for EJB -


i'm trying specialize ejb. 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 opinion, should work, because meaning of @specializes is, cdi should forget core-class , instead use specialized class. found bug https://issues.jboss.org/browse/weld-1451 indicates, possible specialize ejb.

but if try deploy application (i'm using weblogic 12.1.3),

weblogic.utils.errorcollectionexception: there 1 nested errors: weblogic.j2ee.dd.xml.annotationprocessexception: duplicate ejb name 'myfacade' found: annotation 'stateless' on bean class com.foo.core.myfacade , annoation 'stateless' on bean class com.foo.extension.myfacade

am doing wrong?

thanks!

the exception message quoted caused name conflict, not directly related cdi @ all: each ejb can addressed number of different jndi names, , of them (e.g. java:module/myfacade) include simple class name, not package name. cannot have 2 ejbs same name in different packages.

adding cdi , @specializes may prevent specialized ejb showing in cdi container, still ejb.

you can try rename derived class - should solve duplicate name issue, i'm not sure solve overall problem.


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - Bypass Geo Redirect for specific directories -

php - .htaccess mod_rewrite for dynamic url which has domain names -