ApplicationConfig class configures an application in one of the three modes.
In the WEB mode, the application runs in a web container. Its file structure follows Scooter's file structure, unless you reset locations of some files as specified below.
In the APP mode, the application runs outside of a web container. Its file structure follows Scooter's file structure, unless you reset locations of some files as specified below. Scooter's JUnit test uses this mode.
In the ORM mode, no web container is necessary to use scooter. Any application can use Scooter's Active Record or SQL Data Express (SDE) capability in their data access layer. This can be achieved by just using scooter.jar file and some config property files (database.properties, environment.properties, log4j.properties, and sql.properties). The config files must be on the classpath of the running application.
In the ORM mode, application's file structure does not need to follow Scooter's file structure. This is good for those applications that want to include Scooter in their own data access layers.
See sample stand-alone application scooter-orm for more details.
For either WEB or APP mode, application path is required. It is automatically set by WebApplicationStartListener for web application or detected for non-web application.
For example, it the application is located in c:\>project\petclinic, then the application path would be 'c:\>project\petclinic'.
In either WEB or APP mode, the following properties can be set through System property from command line.
Configurable System Properties and corresponding default values for web application: class.file.location => {app.path}/WEB-INF/classes property.file.location => {app.path}/WEB-INF/config source.file.location => {app.path}/WEB-INF/src reference.file.location => {scooter.home}/lib@author (Fei) John Chen
|
|
|
|