Version 9

    JBoss Microkernel Bootstrap

     

    The bootstrap is relatively simple. This is because the microkernel is designed to be

    lightweight, most of the work is done by the services the bootstrap creates.

     

    Step 1 - Creating the bootstrap

     

    • Scripts exist (run.bat and run.sh) to start the JBoss Microkernel. These are optional. The scripts pass parameters to the

      org.jboss.Main

      class which is inside run.jar

    • Main parses the passed parameters and checks that key system properties are in place.

    • Main creates a ServerLoader passing it the parsed parameters.

    • The ServerLoader uses the configured bootstrap classpath to create a classloader.

    • The ServerLoader instantiates, initialises and starts the Server implementation configured in the

      jboss.server.type

      property

     

    Step 2 - Initializing the server (this describes the default implementation)

    • Creates a ServerConfig object from the system properties

    • Overrides the java.io.tmpdir if required

    • Initialises URLHandlers

    • Prints basic configuration information e.g.

    01:47:28,330 INFO  [Server] Starting JBoss (MX MicroKernel)...
    01:47:28,336 INFO  [Server] Release ID: JBoss [Zion] 4.0.0DR4 (build: CVSTag=HEAD date=200405162141)
    01:47:28,339 INFO  [Server] Home Dir: /home/ejort/jboss-head/workspace/build/output/jboss-4.0.0DR4
    01:47:28,340 INFO  [Server] Home URL: file:/home/ejort/jboss-head/workspace/build/output/jboss-4.0.0DR4/
    01:47:28,342 INFO  [Server] Library URL: file:/home/ejort/jboss-head/workspace/build/output/jboss-4.0.0DR4/lib/
    01:47:28,351 INFO  [Server] Patch URL: null
    01:47:28,353 INFO  [Server] Server Name: cts
    01:47:28,354 INFO  [Server] Server Home Dir: /home/ejort/jboss-head/workspace/build/output/jboss-4.0.0DR4/server/cts
    01:47:28,355 INFO  [Server] Server Home URL: file:/home/ejort/jboss-head/workspace/build/output/jboss-4.0.0DR4/server/cts/
    01:47:28,357 INFO  [Server] Server Data Dir: /home/ejort/jboss-head/workspace/build/output/jboss-4.0.0DR4/server/cts/data
    01:47:28,359 INFO  [Server] Server Temp Dir: /home/ejort/jboss-head/workspace/build/output/jboss-4.0.0DR4/server/cts/tmp
    01:47:28,360 INFO  [Server] Server Config URL: file:/home/ejort/jboss-head/workspace/build/output/jboss-4.0.0DR4/server/cts/conf/
    01:47:28,362 INFO  [Server] Server Library URL: file:/home/ejort/jboss-head/workspace/build/output/jboss-4.0.0DR4/server/cts/lib/
    01:47:28,363 INFO  [Server] Root Deployment Filename: jboss-service.xml

     

    Step 3 - Starting the server (this describes the default implementation)

    • Displays the starting message

    01:47:28,372 INFO  [Server] Starting General Purpose Architecture (GPA)...
    • Creates a classloader with all the required boot libraries

    • Instantiates the JMX MBeanServer

    • Registers itself and the ServerConfig as MBeans

    • Registers a ServerInfo this displays some additional info:

    01:47:29,767 INFO  [ServerInfo] Java version: 1.4.2_04,Sun Microsystems Inc.
    01:47:29,768 INFO  [ServerInfo] Java VM: Java HotSpot(TM) Server VM 1.4.2_04-b05,Sun Microsystems Inc
    01:47:29,770 INFO  [ServerInfo] OS-System: Linux 2.4.20-30.9,i386
    01:47:30,822 INFO  [Server] Core system initialized

     

    Step 4 - Starting the other services (this describes the default implementation)

    • Now the microkernel is ready, it deploys the main configuration using the MainDeployer

    • The main configuration is determined by the server config url

      jboss.server.config.url

      and the file name

      jboss.server.root.deployment.filename

       

    • Checks there are no incomplete deployments

    • A life thread is started - in case only daemon threads are running

    • The started message is displayed

    01:48:31,823 INFO  [Server] JBoss (MX MicroKernel) [4.0.0DR4 (build: CVSTag=HEAD date=200405162141)] Started in 1m:1s:1ms
    • Sends a notification to anybody interested in knowing when the server has finished loading

     

    Related