Jboss 7.0.1:176个服务中的122个(54个服务是被动的或按需的)

Ahm*_*med 4 java linux jboss java-ee jboss7.x

运行以下命令后,我在Jboss AS 7.0.1中成功部署了war文件;

/host=master/server-config=mobile:start 
Run Code Online (Sandbox Code Playgroud)

我得到以下内容;

[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)
Run Code Online (Sandbox Code Playgroud)

一切看起来都很好,直到你开始查看176条服务的启动122的最后一行.其他54项服务怎么了?为什么服务器不启动其余服务?

Arj*_*jms 6

JBoss AS 7懒洋洋地启动了一些服务.这意味着当你启动时(并因此占用宝贵的启动时间),它们并非全部启动,而它们可能永远不需要.

例如,当您不在任何bean中使用计时器服务时,不需要启动它.当你从不使用JSF时,不需要进行初始化等.

这与Glassfish采用的方法相同,也是启动速度如此之快的原因之一.

  • 你没有在你的问题中提到这一点.或许最好为此开一个新问题? (4认同)
  • 我同意Arjan,这是另一个问题,您需要指定应用程序公开的接口和端口设置.此外,它有助于了解A)您的预期结果,B)您的过程,以及C)您的结果.按照这个顺序,我们可以更好地帮助解决一个问题,它确实有助于将来遇到这个问题的社区.但很棒的问题! (3认同)