| 1 | <?xml version="1.0" encoding="UTF-8"?> |
|---|
| 2 | <!DOCTYPE section SYSTEM "../documentation.dtd"> |
|---|
| 3 | <section> |
|---|
| 4 | <title>Command line parameters</title> |
|---|
| 5 | |
|---|
| 6 | <para>The framework's bootstrapper takes care or loading up the Naked |
|---|
| 7 | Objects framework and application, initialising it, and running it. When it |
|---|
| 8 | first starts up it reads in a list of components and attempts to load in |
|---|
| 9 | each one. Any component that can be loaded is then available to be used and |
|---|
| 10 | can then be specified on the command line if it needs to be loaded. |
|---|
| 11 | Requesting a component that cannot be loaded will result in an error. To |
|---|
| 12 | resolve such an error simply ensure that the components Jar file is |
|---|
| 13 | available on the class path. All the components supplied with the framework |
|---|
| 14 | are listed in the file <path>framework.properties</path> which is part of |
|---|
| 15 | the <path>nos-bootstrap.jar</path> file.</para> |
|---|
| 16 | |
|---|
| 17 | <para>During starting Naked Objects loads in a number of configuration files |
|---|
| 18 | that you can use to configure framework. The main file, |
|---|
| 19 | <path>nakedobjects.properties</path>, is always loaded and must be present |
|---|
| 20 | for the framework to start up. For each of the options type, persistor and |
|---|
| 21 | viewer a separate configuration file is loaded named after the option value. |
|---|
| 22 | For example, for the following command line parameters</para> |
|---|
| 23 | |
|---|
| 24 | <command-listing>-v dnd -r xml</command-listing> |
|---|
| 25 | |
|---|
| 26 | <para>the framework looks for the files <path>dnd.properties</path> and |
|---|
| 27 | <path>xml.properties</path> and will load them if found.</para> |
|---|
| 28 | |
|---|
| 29 | <heading>Available Jars</heading> |
|---|
| 30 | |
|---|
| 31 | <para>The following are the Jars that are provided with the |
|---|
| 32 | framework:-</para> |
|---|
| 33 | |
|---|
| 34 | <subheading>Core framework</subheading> |
|---|
| 35 | |
|---|
| 36 | <list> |
|---|
| 37 | <para>no-application-library-3.0M3.jar</para> |
|---|
| 38 | |
|---|
| 39 | <para>no-architecture-3.0M3.jar</para> |
|---|
| 40 | |
|---|
| 41 | <para>nof-core-3.0M3.jar</para> |
|---|
| 42 | |
|---|
| 43 | <para>nof-persistor-3.0M3.jar</para> |
|---|
| 44 | |
|---|
| 45 | <para>nof-reflector-core-3.0M3.jar</para> |
|---|
| 46 | |
|---|
| 47 | <para>nof-reflector-java-3.0M3.jar</para> |
|---|
| 48 | |
|---|
| 49 | <para>nos-bootstrap-3.0M3.jar</para> |
|---|
| 50 | |
|---|
| 51 | <para>logging-util-3.0M3.jar</para> |
|---|
| 52 | </list> |
|---|
| 53 | |
|---|
| 54 | <subheading>Framework extensions</subheading> |
|---|
| 55 | |
|---|
| 56 | <list> |
|---|
| 57 | <para>nos-objectstore-sql-3.0M3.jar</para> |
|---|
| 58 | |
|---|
| 59 | <para>nos-objectstore-xml-3.0M3.jar</para> |
|---|
| 60 | |
|---|
| 61 | <para>nos-viewer-cli-3.0M3.jar</para> |
|---|
| 62 | |
|---|
| 63 | <para>nos-viewer-dnd-3.0M3.jar</para> |
|---|
| 64 | |
|---|
| 65 | <para>nos-viewer-html-3.0M3.jar</para> |
|---|
| 66 | |
|---|
| 67 | <para>nos-web-server-3.0M3.jar</para> |
|---|
| 68 | |
|---|
| 69 | <para>nos-xat-framework-3.0M3.jar</para> |
|---|
| 70 | </list> |
|---|
| 71 | |
|---|
| 72 | <subheading>3rd Party</subheading> |
|---|
| 73 | |
|---|
| 74 | <list> |
|---|
| 75 | <para>junit-3.8.1.jar</para> |
|---|
| 76 | |
|---|
| 77 | <para>commons-cli-1.0.jar</para> |
|---|
| 78 | |
|---|
| 79 | <para>log4j-1.2.8.jar</para> |
|---|
| 80 | |
|---|
| 81 | <para>jetty-6.0.2.jar</para> |
|---|
| 82 | |
|---|
| 83 | <para>jetty-util-6.0.2.jar</para> |
|---|
| 84 | |
|---|
| 85 | <para>servlet-api-2.5-6.0.2.jar</para> |
|---|
| 86 | </list> |
|---|
| 87 | |
|---|
| 88 | <subheading></subheading> |
|---|
| 89 | |
|---|
| 90 | <subheading>Hibernate</subheading> |
|---|
| 91 | |
|---|
| 92 | <list> |
|---|
| 93 | <para>antlr-2.7.6.jar</para> |
|---|
| 94 | |
|---|
| 95 | <para>asm-1.5.3.jar</para> |
|---|
| 96 | |
|---|
| 97 | <para>asm-attrs-1.5.3.jar</para> |
|---|
| 98 | |
|---|
| 99 | <para>c3p0-0.9.0.jar</para> |
|---|
| 100 | |
|---|
| 101 | <para>cglib-2.1_3.jar</para> |
|---|
| 102 | |
|---|
| 103 | <para>commons-collections-2.1.1.jar</para> |
|---|
| 104 | |
|---|
| 105 | <para>commons-lang-1.0.jar</para> |
|---|
| 106 | |
|---|
| 107 | <para>commons-logging-1.0.4.jar</para> |
|---|
| 108 | |
|---|
| 109 | <para>commons-logging-1.0.jar</para> |
|---|
| 110 | |
|---|
| 111 | <para>dom4j-1.6.1.jar</para> |
|---|
| 112 | |
|---|
| 113 | <para>easymock-1.2_Java1.3.jar</para> |
|---|
| 114 | |
|---|
| 115 | <para>ehcache-1.2.3.jar</para> |
|---|
| 116 | |
|---|
| 117 | <para>freemarker-2.3.4.jar</para> |
|---|
| 118 | |
|---|
| 119 | <para>geronimo-spec-jta-1.0.1B-rc1.jar</para> |
|---|
| 120 | |
|---|
| 121 | <para>hibernate-3.2.1.ga.jar</para> |
|---|
| 122 | |
|---|
| 123 | <para>hibernate-annotations-3.2.0.ga.jar</para> |
|---|
| 124 | |
|---|
| 125 | <para>hibernate-tools-3.2.0.beta8.jar</para> |
|---|
| 126 | |
|---|
| 127 | <para>hsqldb-1.8.0.7.jar</para> |
|---|
| 128 | |
|---|
| 129 | <para>jta-1.0.1B.jar</para> |
|---|
| 130 | |
|---|
| 131 | <para>jtidy-r8-21122004.jar</para> |
|---|
| 132 | |
|---|
| 133 | <para>nos-objectstore-hibernate-3.0M3.jar</para> |
|---|
| 134 | |
|---|
| 135 | <para>persistence-api-1.0.jar</para> |
|---|
| 136 | </list> |
|---|
| 137 | |
|---|
| 138 | <comment>TODO add list of Jars and indication of what each is for</comment> |
|---|
| 139 | |
|---|
| 140 | <heading>Options</heading> |
|---|
| 141 | |
|---|
| 142 | <para>The bootstrapper is the class |
|---|
| 143 | <class>org.nakedobjects.nof.boot.NakedObjects</class> and takes the |
|---|
| 144 | following options on the command line.</para> |
|---|
| 145 | |
|---|
| 146 | <subheading>Configuration</subheading> |
|---|
| 147 | |
|---|
| 148 | <command-listing>-c <config file> |
|---|
| 149 | --config <config file></command-listing> |
|---|
| 150 | |
|---|
| 151 | <para>Loads in the specified configuration file, in additon to |
|---|
| 152 | <path>nakedobjects.properties</path> and the properties files relating to |
|---|
| 153 | component.</para> |
|---|
| 154 | |
|---|
| 155 | <subheading>Disable splash</subheading> |
|---|
| 156 | |
|---|
| 157 | <command-listing>-s |
|---|
| 158 | --nosplash</command-listing> |
|---|
| 159 | |
|---|
| 160 | <para>Prevents the splash screen from being displayed during start |
|---|
| 161 | up.</para> |
|---|
| 162 | |
|---|
| 163 | <subheading>Help</subheading> |
|---|
| 164 | |
|---|
| 165 | <command-listing>-h |
|---|
| 166 | --help</command-listing> |
|---|
| 167 | |
|---|
| 168 | <para>Prints out the options that are available. This is dynamic so that |
|---|
| 169 | only the components that can be used are listed.</para> |
|---|
| 170 | |
|---|
| 171 | <subheading>Logging</subheading> |
|---|
| 172 | |
|---|
| 173 | <para>The amount of logging detail can be controlled from the command line. |
|---|
| 174 | If no flag is specified only warnings and errors are output. All logging |
|---|
| 175 | level relate to the Log4J levels, which is the logging mechanism used by |
|---|
| 176 | Naked Objects.</para> |
|---|
| 177 | |
|---|
| 178 | <command-listing>-quiet</command-listing> |
|---|
| 179 | |
|---|
| 180 | <para>Quiet reduces logging to show errors only.</para> |
|---|
| 181 | |
|---|
| 182 | <command-listing>-verbose</command-listing> |
|---|
| 183 | |
|---|
| 184 | <para>Increases logging to show information about the system as it |
|---|
| 185 | runs.</para> |
|---|
| 186 | |
|---|
| 187 | <command-listing>-debug</command-listing> |
|---|
| 188 | |
|---|
| 189 | <para>Increases logging to show all logged entries. This level is very |
|---|
| 190 | verbose and will slow down the system if used when outputting log details to |
|---|
| 191 | the console.</para> |
|---|
| 192 | |
|---|
| 193 | <subheading>Mode</subheading> |
|---|
| 194 | |
|---|
| 195 | <command-listing>-t <mode> |
|---|
| 196 | --type <mode></command-listing> |
|---|
| 197 | |
|---|
| 198 | <para>The mode the framwork is started up in must be one of the following, |
|---|
| 199 | and defaults to <ital>prototype</ital>.</para> |
|---|
| 200 | |
|---|
| 201 | <para><ital>exploration</ital> - Exploration mode is for developers to |
|---|
| 202 | explore and test their code. The framework always uses an in-memory |
|---|
| 203 | persistor and runs the fixtures at startup to ensure a known state every |
|---|
| 204 | time the system is started. The user is not prompted to log in, but is |
|---|
| 205 | automatically logged in as user 'explore'. The logged in user can be changed |
|---|
| 206 | on the fly using an option with the user interface; this simply changes the |
|---|
| 207 | user and does not require an explicit login action. Also, exploration |
|---|
| 208 | methods defined in the DOM are also available to the user to do thing things |
|---|
| 209 | that a user would not normally be allowed to do. These are used for |
|---|
| 210 | expressly for testing the system. Please note it is an error to specify a |
|---|
| 211 | persistor type in exploration mode.</para> |
|---|
| 212 | |
|---|
| 213 | <para><ital>prototype</ital> - Prototype mode is for demonstrating the |
|---|
| 214 | system in realistic fashion. The framework always uses an in-memory |
|---|
| 215 | persistor and runs the fixtures at startup to ensure a known state every |
|---|
| 216 | time the system is started. The user is always prompted to log in at start |
|---|
| 217 | up, and can log out and log in again without losing the state of the |
|---|
| 218 | objects. This allows a user to demonstrate exactly how a system would work. |
|---|
| 219 | Please note it is an error to specify a persistor type in prototype |
|---|
| 220 | mode.</para> |
|---|
| 221 | |
|---|
| 222 | <para><ital>standalone</ital> - Standalone mode runs the system for a single |
|---|
| 223 | user with object persistence.</para> |
|---|
| 224 | |
|---|
| 225 | <para><ital>client</ital> - Client mode provides multiple users access to a |
|---|
| 226 | server. With this mode selected the <ital>connection</ital> option must also |
|---|
| 227 | be specified.</para> |
|---|
| 228 | |
|---|
| 229 | <para><ital>server</ital> - Server mode runs Naked Objects as a server for |
|---|
| 230 | multiple clients. With this mode selected the <ital>connection</ital> option |
|---|
| 231 | must also be specified.</para> |
|---|
| 232 | |
|---|
| 233 | <subheading>Overridden properties</subheading> |
|---|
| 234 | |
|---|
| 235 | <command-listing>-D property=value |
|---|
| 236 | </command-listing> |
|---|
| 237 | |
|---|
| 238 | <para>Using this flag we can pass in properties from the command line that |
|---|
| 239 | would otherwise need to specified in a configuration file. This is normally |
|---|
| 240 | used to override a property, or to temporarily specify one.</para> |
|---|
| 241 | |
|---|
| 242 | <subheading>Password</subheading> |
|---|
| 243 | |
|---|
| 244 | <command-listing>-p <password> |
|---|
| 245 | --password <password></command-listing> |
|---|
| 246 | |
|---|
| 247 | <para>Ignored if type is prototype or not used with the user option |
|---|
| 248 | below.</para> |
|---|
| 249 | |
|---|
| 250 | <para>Uses the specified password when logging the user in with the username |
|---|
| 251 | specified with <property>--user</property>.</para> |
|---|
| 252 | |
|---|
| 253 | <subheading>Persistor</subheading> |
|---|
| 254 | |
|---|
| 255 | <command-listing>-r <persistor> |
|---|
| 256 | --persistor <persistor></command-listing> |
|---|
| 257 | |
|---|
| 258 | <para>Ignored if type is prototype or client.</para> |
|---|
| 259 | |
|---|
| 260 | <para>The persistor option allows you choose how the objects created by the |
|---|
| 261 | system will be persisted so they are still available next time you run the |
|---|
| 262 | system. The following options are available with current distribution, and |
|---|
| 263 | if none is specified then the xml persistor will be used by default.</para> |
|---|
| 264 | |
|---|
| 265 | <para><ital>in-memory</ital> - A simple non-persisting mechanism that will |
|---|
| 266 | only hold the persisted object while the virtual machine is running. This is |
|---|
| 267 | used for testing and demonstrating.</para> |
|---|
| 268 | |
|---|
| 269 | <para><ital>xml</ital> - A simple file based mechanism that encodes each |
|---|
| 270 | objects data in an XML file. Alongside the data files for the objects are |
|---|
| 271 | instance lists listing all the files for each type of object.</para> |
|---|
| 272 | |
|---|
| 273 | <para><ital>sql</ital> - A simple JDBC based mechanism that creates basic |
|---|
| 274 | tables for each object type and uses these to store the object's |
|---|
| 275 | data.</para> |
|---|
| 276 | |
|---|
| 277 | <para><ital>hibernate</ital> - Interface to Hibernate ORM, allowing |
|---|
| 278 | automatic persistence of an entire DOM with the power and flexibility that |
|---|
| 279 | Hibernate provides.</para> |
|---|
| 280 | |
|---|
| 281 | <para><ital><class name></ital> - By specifying a class name the boot |
|---|
| 282 | loader will load up that class as the persistor.</para> |
|---|
| 283 | |
|---|
| 284 | <subheading>Remote connection</subheading> |
|---|
| 285 | |
|---|
| 286 | <command-listing>-x <connector> |
|---|
| 287 | --connection <connector></command-listing> |
|---|
| 288 | |
|---|
| 289 | <para>Ignored if mode is neither a client or server. If the type is either |
|---|
| 290 | server or client then a connection mechanism can be specified. Connector |
|---|
| 291 | mechanisms available are:-</para> |
|---|
| 292 | |
|---|
| 293 | <para><ital>xstream</ital> - Uses the Xstream library to |
|---|
| 294 | serialize/deserialize objects to/from XML for simple stream |
|---|
| 295 | communications.</para> |
|---|
| 296 | |
|---|
| 297 | <para><ital>web</ital> - opens a HTTP listener for processing requests from |
|---|
| 298 | web browsers. This can be used to run the framework as a basic web |
|---|
| 299 | server.</para> |
|---|
| 300 | |
|---|
| 301 | <subheading>User</subheading> |
|---|
| 302 | |
|---|
| 303 | <command-listing>-u <user name> |
|---|
| 304 | --user <user name></command-listing> |
|---|
| 305 | |
|---|
| 306 | <para>Ignored if type is prototype.</para> |
|---|
| 307 | |
|---|
| 308 | <para>Uses the specified name when logging the user in. If the password is |
|---|
| 309 | also specified (see above) then an attempt to log in using the supplied user |
|---|
| 310 | name and password is made; authentication failure at this point will exit |
|---|
| 311 | the program.</para> |
|---|
| 312 | |
|---|
| 313 | <subheading>Viewer</subheading> |
|---|
| 314 | |
|---|
| 315 | <command-listing>-v <viewer> |
|---|
| 316 | --viewer <viewer></command-listing> |
|---|
| 317 | |
|---|
| 318 | <para>Ignored if type is server.</para> |
|---|
| 319 | |
|---|
| 320 | <para>The viewer option allows you to choose the user interface that is used |
|---|
| 321 | to access your Naked Objects application. The following options are |
|---|
| 322 | available with current distribution, and if none is specified then the drag |
|---|
| 323 | and drop view will be used by default.</para> |
|---|
| 324 | |
|---|
| 325 | <para><ital>dnd</ital> - Drag and Drop viewer</para> |
|---|
| 326 | |
|---|
| 327 | <para><ital>cli</ital> - Console based Command Line Interface</para> |
|---|
| 328 | |
|---|
| 329 | <para><ital>cli-awt</ital> -Command Line Interface running via a basic Java |
|---|
| 330 | AWT window</para> |
|---|
| 331 | |
|---|
| 332 | <para><ital>web</ital> - Web browser viewer - accessed via standard web |
|---|
| 333 | browser such as FireFox, Internet Explora or Opera</para> |
|---|
| 334 | |
|---|
| 335 | <para><ital><class name></ital> - By specifying a class name the boot |
|---|
| 336 | loader will load up that class as the viewer</para> |
|---|
| 337 | </section> |
|---|