cdi - Can I lookup EJB from BeanManager in web module? -
i have app package in ear estructure bellow:
myapp.ear - myapp-ejb.jar - myapp-ejbclient.jar - myapp-web.war
i have beans.xml in both myapp-ejb , myapp-web modules. web module have write code lookup ejb cdi, no beans found in jboss 7.1. if use code in jboss 7.0 webprofile, code works fine.
there way lookup ejbs using beanmanager?
set<bean<?>> beans = beanmanager.getbeans(myejb.class, qualifiers); bean<?> bean = (bean<?>) beans.iterator().next(); creationalcontext<?> ctx = beanmanager.createcreationalcontext(bean); myejb ejb = beanmanager.getreference(bean, myejb.class, ctx);
[update]
my ejbs remote, , application deployed in 1 ear modules inside.
Comments
Post a Comment