In Weblogic 10.3, how do I inject a remote EJB from one EAR into a Stateless bean of another, both EARs being deployed in the same container? Ideally I'd like to do as much as possible with annotations.
So suppose I have the following interface:
public interface HelloService {
public String hello();
}
implemented by the following EJB:
@Stateless
@Remote
public class HelloServiceBean implements HelloService {
public String hello() {
return "hello";
}
}
Suppose they're packaged and deployed in server.ear
. Now in client.ear
, I have the following:
@Stateless
public class HelloClientBean {
@EJB
HelloService helloService;
// other methods...
}
What do I need to add so that Weblogic figures out the wiring correctly between HelloClientBean
in client.ear
and HelloServiceBean
in server.ear
? Pointers to official documentations and/or books warmly welcome.