-
Notifications
You must be signed in to change notification settings - Fork 5
Centipede options
A centipede program is run like this
java <java-options> -jar <jarfile> <centipede-options> run <command-name> <command-options>
The path.sh
script defines a shell function that takes care of everything before the <centipede-options>
so you can write
command-name <centipede-options> run <command-name> <command-options>
often the are blank. The configure the operation of the centipede system. The following options are available
-applicationContext -- this defines an additional application context file that will be read after the application context built into the jar, and the .command-name/applicationContext.xml
file. You can specify a path either in the classpath (i.e. classpath:com/ontology2/someContext.xml
) or in the filesystem (i.e.. file:/home/somebody/specialContext.xml
.) If you specify this option multiple times, all the files you give will be loaded in the sequence you specify them.
Since bean definitions in each context file override the bean definitions in previous files, this mechanism can override the configuration of any part of a centipede application. The default configuration, which "works out of the box", can be customized for any purpose needed for development, test, or production.
-lazy -- The lazy
option causes Spring to create beans only when necessary. This speeds up initialization for large apps that contain many objects, not all of which are used in all commands.
-eager -- the eager
option causes Spring to create beans as soon as possible. Misconfigurations in the container that cause object construction to fail are detected at boot time rather than later in execution. A centipede application should be tested in eager mode at least once before acceptance.
If you specify both -lazy
and -eager
you will get an error message. If you specify neither, you get the behavior specified by the big-B Boolean
returned by theisLazyByDefault()
method of your CommandLineApplication
. If this is true
, you get -lazy
, if false
you get -eager
, and if null
you get the default Spring behavior which allows you to specify laziness of individual beans.