gpt4 book ai didi

java - EJB3 bean 部署依赖项

转载 作者:行者123 更新时间:2023-12-01 16:03:23 25 4
gpt4 key购买 nike

我有两个无状态 EJB3 bean,其中 bean1 依赖于 bean2。

在部署过程中,我收到以下错误

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 之后启动

最佳答案

最终使用了@Depends特定于 JBoss 的注释。

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

关于java - EJB3 bean 部署依赖项,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3236312/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com