简体   繁体   中英

EJB3 beans deployment dependencies

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, ie specify that bean2 should only start after bean1

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
   {
    ...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM