Class ContainerLoader

java.lang.Object
org.apache.ofbiz.base.container.ContainerLoader

public class ContainerLoader extends Object
An object that loads containers (background processes). Normally, instances of this class are created by OFBiz startup code, and client code should not create instances of this class. Client code is responsible for making sure containers are shut down properly.

When OFBiz starts, the main thread will create the ContainerLoader instance and then call the loader's load method. After this instance has been created and initialized, the main thread will call the start method. When OFBiz shuts down, a separate shutdown thread will call the unload method.

  • Constructor Details

    • ContainerLoader

      public ContainerLoader()
  • Method Details

    • load

      public void load(Config config, List<StartupCommand> ofbizCommands) throws StartupException
      Starts the containers.
      Parameters:
      config - Startup config
      ofbizCommands - Command-line arguments
      Throws:
      StartupException - If an error was encountered. Throwing this exception will halt loader loading, so it should be thrown only when OFBiz can't operate without it.
    • unload

      public void unload()
      Stops the containers.