views:

33

answers:

1

I have a two Stateless EJB3 beans with bean1 depending on bean2.

During deployment i get the error below

2010-07-13 12:30:43,480 ERROR [org.jboss.system.server.profileservice.ProfileServiceBootstrap] (main) Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

DEPLOYMENTS MISSING DEPENDENCIES:
  Deployment "jboss.j2ee:jar=MyApp-Test.jar,name=TestWebService,service=EJB3" is missing the following dependencies:
    Dependency "<UNKNOWN jboss.j2ee:jar=MyApp-Test.jar,name=TestWebService,service=EJB3>" (should be in state "Described", but is actually in state "** UNRESOLVED Demands 'Class:my.app.impl.TestService' **")
  Deployment "jboss.j2ee:jar=MyApp-Test.jar,name=TestWebService,service=EJB3_endpoint" is missing the following dependencies:
    Dependency "jboss.j2ee:jar=MyApp-Test.jar,name=TestWebService,service=EJB3" (should be in state "Configured", but is actually in state "PreInstall")

bean2 won't start because bean1 is in 'PreInsall' state

Is there a way of specifying EJB bean dependencies, i.e. specify that bean2 should only start after bean1

A: 

Ended up using the @Depends annotation specific to JBoss.

@Service (objectName = "jboss:custom=Name")
@Remote(ServiceOneRemote.class)
@Depends ({"jboss:service=someService"})
public class ServiceOne implements ServiceOneRemote, ServiceOneManagement
   {
    ...
n002213f