users@glassfish.java.net

Re: EJB look up problem between 2 ear's - Glassfish v3

From: <glassfish_at_javadesktop.org>
Date: Mon, 20 Sep 2010 18:55:33 PDT

For EAR2 to access EAR1.EJB1, it has to be through a remote business interface.

Then you can try using field injection:

1. In SLSB2, used
public SLSB1ManagerLocal slsb1manager;
  @EJB (lookup="java:global/ear1/ejbjar1/ejb1")
  private Ejb1Remote ejb1;

also need to packge ejb1 remote interface classes into EAR2/lib/xxx.jar
[Message sent by forum member 'cf126330']

http://forums.java.net/jive/thread.jspa?messageID=483201