Could someone help me understand the use of beanInterface
parameter of @EJB
annotation in JavaEE 6?
I have a situation in which I have an EJB and I want it to be accessed locally and remotely as well.
I have a MyBaseInterface
and then both MyEJBLocalInterface
and MyEJBRemoteInterface
extending MyBaseInterface
. Now I have MyEJB
which is implementing both MyEJBLocalInterface
and MyEJBRemoteInterface
.
Now I have a situation in which I want only to access MyEJB
locally.
Could I achieve the same with the following?
@EJB(beanInterface=MyEJBLocalInterface.class)
private MyBaseInterface instanceOfLocallyAccessedMyEJB;
Could someone help me understand the use of beanInterface
parameter of @EJB
attribute?
Thanks.