Can someone help me understand the use of the beanInterface parameter of beanInterface annotations in JavaEE 6?
I have a situation where I have an EJB and I want it to be accessed locally and remotely.
I have MyBaseInterface and then MyEJBLocalInterface and MyEJBRemoteInterface extending MyBaseInterface . Now I have MyEJB that implements both MyEJBLocalInterface and MyEJBRemoteInterface .
Now I have a situation where I want to access only MyEJB locally.
Can I do the same with the following?
@EJB(beanInterface=MyEJBLocalInterface.class) private MyBaseInterface instanceOfLocallyAccessedMyEJB;
Can someone help me understand the use of the beanInterface parameter of the beanInterface attribute?
Thanks.
source share