org.jboss
Class Main

java.lang.Object
  extended by org.jboss.Main

public class Main
extends Object

Provides a command line interface to start the JBoss server.

To enable debug or trace messages durring boot change the Log4j configuration to use either log4j-debug.properties log4j-trace.properties by setting the system property log4j.configuration:

   ./run.sh -Dlog4j.configuration=log4j-debug.properties
 
TODO: Should jdk logging be the default

Version:
$Revision: 88978 $
Author:
Marc Fleury, Jason Dillon, Adrian Brock, Scott Stark, Dimitris Andreadis

Constructor Summary
Main()
          Explicit constructor.
 
Method Summary
 void boot(String[] args)
          Boot up JBoss.
 org.jboss.bootstrap.spi.Server getServer()
          Access the booted server.
static void main(String[] args)
          This is where the magic begins.
 void shutdown()
          Shutdown the booted Server instance.
static void systemExit(String[] argv)
          This method is here so that if JBoss is running under Alexandria (An NT Service Installer), Alexandria can shutdown the system down correctly.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Main

public Main()
Explicit constructor.

Method Detail

getServer

public org.jboss.bootstrap.spi.Server getServer()
Access the booted server.

Returns:
the Server instance.

boot

public void boot(String[] args)
          throws Exception
Boot up JBoss.

Parameters:
args - The command line arguments.
Throws:
Exception - Failed to boot.

shutdown

public void shutdown()
Shutdown the booted Server instance.


main

public static void main(String[] args)
                 throws Exception
This is where the magic begins.

Starts up inside of a "jboss" thread group to allow better identification of JBoss threads.

Parameters:
args - The command line arguments.
Throws:
Exception - for any error

systemExit

public static void systemExit(String[] argv)
This method is here so that if JBoss is running under Alexandria (An NT Service Installer), Alexandria can shutdown the system down correctly.

Parameters:
argv - the arguments


Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.