2010-07-13 88 views
0

我有两个无状态的EJB3 bean,bean1取决于bean2。EJB3 bean部署依赖关系

在部署过程中,我得到以下

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错误将无法启动,因为bean1是“PreInsall”状态

是否有指定的EJB bean依赖的方式,即指定bean2应只在bean1后面开始

+0

我在春天看到有'@ Primary'注释 – n002213f 2010-07-13 10:47:24

+0

关于您的项目结构的更多细节? EAR中的这些独立模块还是都在同一个包中? – apiri 2010-07-16 21:00:43

+0

我使用不同的** jar部署**并且它们在不同的包中 – n002213f 2010-07-17 16:02:15

回答

0

使用特定于JBoss的@Depends注释结束。

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