运行以下命令后,我在Jboss AS 7.0.1 中成功部署了我的war 文件;
/host=master/server-config=mobile:start
我得到以下信息;
[Server:mobile] 12:47:50,349 INFO [org.jboss.as.logging] (MSC service thread 1-4) Removing bootstrap log handlers
[Server:mobile] 12:47:50,391 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-4) Bound data source [java:jboss/datasources/ExampleDS]
[Server:mobile] 12:47:51,034 INFO [org.jboss.as.ee] (Controller Boot Thread) Activating EE subsystem
[Server:mobile] 12:47:51,068 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) Starting deployment of "MobileGateway.war"
[Server:mobile] 12:47:51,515 INFO [org.jboss.as.jpa] (MSC service thread 1-1) added javax.persistence.api dependency to MobileGateway.war
[Server:mobile] 12:47:51,809 INFO [org.jboss.web] (MSC service thread 1-4) registering web context: /MobileGateway
[Server:mobile] 12:47:51,822 INFO [org.jboss.as.server.controller] (Controller Boot Thread) Deployed "MobileGateway.war"
[Server:mobile] 12:47:51,824 INFO [org.jboss.as] (Controller Boot Thread) JBoss AS 7.0.1.Final "Zap" started in 4692ms - Started 122 of 176 services (54 services are passive or on-demand)
一切看起来都很好,直到您开始查看最后一行,上面写着 Started 122 of 176 services。其他 54 个服务发生了什么?为什么服务器不启动其余服务?
最佳答案
JBoss AS 7 延迟启动一些服务。这意味着它们在您启动时并没有全部启动(因此占用了宝贵的启动时间),而它们可能永远不需要。
例如当您不在任何 bean 中使用计时器服务时,不需要启动它。当您从不使用 JSF 时,无需对其进行初始化等操作。
这与 Glassfish 所采用的方法相同,这也是它启动如此之快的原因之一。
关于java - Jboss 7.0.1 : Started 122 of 176 services (54 services are passive or on-demand),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8480712/