Save This Page
Home » jboss-5.0.0.CR1-src » org » jboss » tools » [javadoc | source]
org.jboss.tools
public class: Boot [javadoc | source]
java.lang.Object
   org.jboss.tools.Boot
Starts multiple applications using seperate classloaders. This allows multiple applications to co-exist even if they typicaly could not due to class version problems. Each application is started in it's own thread. Usage is Boot [-debug] -cp app-classpath app-class-name app-arguments ( , -cp app-classpath app-class-name app-arguments )* Where: app-classpath is a comma seperated URL form classpath to the application classes. app-class-name is the class that will be started app-arguments will be the String[] that will be passed to the main method of the application class Jboss + Another Application boot example: Boot -cp file:run.jar org.jboss.Main default , -cp file:./myapp.jar,file:./util.jar test.App2TEST arg1 arg2 Would start the JBoss Server using the default configuration and it would start the test.App2TEST application. Important Note: Notice that there are spaces before and after the ","!!! You can now boot other applications via ths Boot class from withing one of the applications that was booted by the Boot. Example usage: Boot b = Boot.getInstance(); Boot.ApplicationBoot ab = b.createApplicationBoot(); ab.applicationClass = "org.jboss.Main" ab.classpath.add(new URL("file:run.jar")); ab.args.add("default"); // this would start the application in a new thread. b.startApplication( ab ); // Would boot the appp in the current thread. ab.boot();
Nested Class Summary:
public class  Boot.ApplicationBoot  Represents an application that can be booted. 
protected static class  Boot.InvalidCommandLineException   
Field Summary
protected  boolean verbose    Indicates whether this instance is running in debug mode. 
protected  LinkedList applicationBoots    For each booted application, we will store a ApplicationBoot object in this linked list. 
static  Boot instance     
 ThreadGroup bootThreadGroup     
protected static final  String HELP     
protected static final  String VERBOSE     
protected static final  String BOOT_APP_SEPERATOR     
protected static final  String CP     
Constructor:
 protected Boot() 
Method from org.jboss.tools.Boot Summary:
createApplicationBoot,   getInstance,   getStartedApplications,   main,   processAppBootCommandLine,   processBootOptions,   processCommandLine,   showUsage,   startApplication,   systemExit,   verbose
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.jboss.tools.Boot Detail:
 public Boot.ApplicationBoot createApplicationBoot() 
    This can be used to boot another application From within another one.
 public static Boot getInstance() 
 public synchronized Boot.ApplicationBoot[] getStartedApplications() 
 public static  void main(String[] args) 
    Main entry point when called from the command line
 protected Boot.ApplicationBoot processAppBootCommandLine(LinkedList args) throws Exception 
    Processes the command line argumenst for the next application on the command line.
 protected  void processBootOptions(LinkedList args) throws Exception 
    Processes to global options.
 protected LinkedList processCommandLine(LinkedList args) throws Exception 
    Processes the Boot class's command line arguments
 protected static  void showUsage() 
 public synchronized  void startApplication(Boot.ApplicationBoot bootData) throws Exception 
    Boots the application in a new threadgroup and thread.
 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.
 protected  void verbose(String msg) 
    logs verbose message to the console