[jboss-user] [EJB 3.0] - Re: @EJB injection always injects remote object, why not loc
jainsau
do-not-reply at jboss.com
Thu Aug 2 12:36:59 EDT 2007
I apologize. I did not notice that in your example you are specifying the interface classes for each annotation. I just saw that the bean can be annotated with both @local and @remote, and so I thought I was doing it right.
By using two interfaces it works fine. Thanks for your time and effort.
But then to fetch a proxy we need to be aware in our code how the bean is deployed (by declaring a variable of the correct interface type).
Isnt there a way where we could be unaware of the deployment location of the EJB and depend on JBoss to intelligently return us the correct proxy?
Something like this:
@EJB
BusinessInterface interfaceVar;
where business interface could be a super interface of the local and remote interfaces. I have tried it and it doesnt work. But is there any way?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4070184#4070184
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4070184
More information about the jboss-user
mailing list