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

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -