简体   繁体   English

EJB3 bean部署依赖性

[英]EJB3 beans deployment dependencies

I have a two Stateless EJB3 beans with bean1 depending on bean2. 我有两个bean1的无状态EJB3 bean,具体取决于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 bean2无法启动,因为bean1处于“ PreInsall”状态

Is there a way of specifying EJB bean dependencies, ie specify that bean2 should only start after bean1 有没有一种指定EJB bean依赖关系的方法,即指定bean2应该仅在bean1之后启动

Ended up using the @Depends annotation specific to JBoss. 最后使用特定于JBoss的@Depends注释。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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