public interface StartupLoader
When OFBiz starts, the main thread will create the
StartupLoader instance and
then call the loader's
load method. If the method returns without
throwing an exception the loader will be added to a list of initialized loaders.
After all instances have been created and initialized, the main thread will call the
start method of each loader in the list. When OFBiz shuts down, a
separate shutdown thread will call the
unload method of each loader.
Implementations should anticipate asynchronous calls to the methods by different
void load(Config config, java.util.List<StartupCommand> ofbizCommands) throws StartupException
config- Startup config.
ofbizCommands- Command-line arguments.
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.