Jboss 7.0.1: 122 of 176 services started (54 services are passive or on demand)

I successfully deployed my war file in Jboss AS 7.0.1 after running the following command:

/host=master/server-config=mobile:start 

I get the following:

 [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) 

Everything looks good until you start looking at the last line, which says that 122 of 176 services have been launched. What happened to the other 54 services? Why does the server not start other services?

+4
source share
1 answer

JBoss AS 7 launches some services lazily. This means that they are not all started at startup (and thus, they get precious startup time) when they may never be needed.

eg. if you are not using the timer service in any of the beans, you do not need to start it. When you never use JSF, there is no need to initialize it, etc.

This is the same approach as Glassfish, and this is one of the reasons why it starts so fast.

+6
source

Source: https://habr.com/ru/post/1385974/


All Articles