Hi,
I'm trying to deploy an EAR with two WARs. Each WAR has a local interface
EJB and a proxy to the other WAR's EJB.
Here is the code:
war1:
@Stateless
public class Ejb1 implements War1interface
{
@EJB(mappedName="java:app/war2/Ejb2")
War1interface ejb;
@Override
public void do1()
{
}
}
war2:
@Stateless
public class Ejb2 implements War2interface
{
@EJB(mappedName="java:app/war1/Ejb1")
War1interface ejb;
@Override
public void do2()
{
}
}
When trying to deploy, I'm getting:
"Error: Unresolved <ejb-link>: war1.war#Ejb1"
Actually, this can also be reproduced without cyclic referencing. If I
remove the EJB annotation from Ejb2, then the ear get deployed fine. On the
other hand, if I remove the EJB annotation from Ejb1, I am getting the same
error. This leads me to believe that it has to do with the order the ejb
container is publishing the EJB's.
I am using glassfish v3 preview b56.
Is this a bug or am I missing something here?
Thanks,
Ori