Hi.
I have two .ear files, say A.ear and B.ear.
The problem is that B.ear needs to be deployed before A.ear, in order for an @EJB injection in A.ear to find a session bean in JNDI (created by B.ear)
I can deploy them in that order, and everything is fine (the JNDI has the entry by the time it must be injected). When I stop and start JBoss however, there are problems because A.ear is deployed before B.ear and the injection fails.
Is there any way in which dependancies can be specified for EJB3 in a similar way as for MBeans (with a "depends" tag), or any other way.
I'd prefer it if the dependancy can be resolved by not changing the ear files to 01-B.ear and 02-A.ear in oder for the deployer to deploy B before A.
Any help would be greatly appreciated!
Thanx,
Gerhard
I managed to solve my own problem!
I only needed to add a @Depends annotation in some of the B.ear classes to make them depend on the one's in A.ear
Something to the extent of
@Depends({"jboss.j2ee:ear=A.ear,jar=A-ejb.jar,name=SomeClassName,service=EJB3"})
Gerhard