Ubik Batch Server Development mode

From UbikWiki

(Difference between revisions)
(New page: =Development Mode= == Explanation: == When development mode is enabled, Batch Server can automatically create an HSQLDB database and all needed SQL tables by itself, so users don't have to...)
(How to:)

Line 12:

Line 12:

config.properties:
config.properties:
-
<source lang="txt">
+
<source lang="text">
...
...
DEVELOPMENT_MODE=true
DEVELOPMENT_MODE=true

Revision as of 18:46, 10 April 2009

Development Mode

Explanation:

When development mode is enabled, Batch Server can automatically create an HSQLDB database and all needed SQL tables by itself, so users don't have to create the database.

In development mode HSQL database files are created in a directory that you specify in configuration files. By deleting this files your batch server will recreate an empty database at startup. You can also save this files to make backups of a particular database state.

How to:

To enable the development mode in your batch server you just have to add the following line in your config.properties (see installation guide):

config.properties:

...
 DEVELOPMENT_MODE=true

This feature only works with an HSQLDB database, so you have to change the "username", "driverClassName" and "url" parameters in your datasource.xml like this:

Datasource.xml:

...
 <ResourceParams name="jdbc/console">
    <parameter>
      <name>username</name>
      <value>sa</value>
    </parameter>
    <parameter>
      <name>isPasswordEncrypted</name>
      <value>false</value>
    </parameter>
    <parameter>
      <name>driverClassName</name>
      <value>org.hsqldb.jdbcDriver</value>
    </parameter>
    <parameter>
      <name>url</name>
      <value><![CDATA[jdbc:hsqldb:file:C:\jdbc\hsql\console\consoleHSQL2]]></value>
    </parameter>
    <parameter>
      <name>validationQuery</name>
      <value><![CDATA[select 1 from INFORMATION_SCHEMA.SYSTEM_USERS]]></value>
    </parameter>
    <parameter>
      <name>testOnBorrow</name>
      <value>true</value>
    </parameter>
 ...
  • username: you have to set this parameter with a "sa" default value
  • driverClassName: "org.hsqldb.jdbcDriver"
  • url: the jdbc url for development mode is formatted like this: "jdbc:hsqldb:file:$DIRECTORY_PATH/$DATABASE_NAME"

You just have to ensure that $DIRECTORY_PATH exists and is readable because the HSQL database will be created in it. A $DATABASE_NAME.properties and $DATABASE_NAME.log will be created by Batch server to store database.

Example of startup log in development mode:


GeSHi Error: GeSHi could not find the language shell (using path /home/ubikinge/www/ubikwiki/extensions/SyntaxHighlight_GeSHi/geshi/geshi/) (code 2)

You need to specify a language like this: <source lang="html">...</source>

Supported languages for syntax highlighting:

abap, actionscript, ada, apache, applescript, asm, asp, autoit, bash, blitzbasic, bnf, c, c_mac, caddcl, cadlisp, cfdg, cfm, cpp, cpp-qt, csharp, css, d, delphi, diff, div, dos, dot, eiffel, fortran, freebasic, genero, gml, groovy, haskell, html4strict, idl, ini, inno, io, java, java5, javascript, latex, lisp, lua, m68k, matlab, mirc, mpasm, mysql, nsis, objc, ocaml, ocaml-brief, oobas, oracle8, pascal, per, perl, php, php-brief, plsql, python, qbasic, rails, reg, robots, ruby, sas, scheme, sdlbasic, smalltalk, smarty, sql, tcl, text, thinbasic, tsql, vb, vbnet, vhdl, visualfoxpro, winbatch, xml, xpp, z80

Personal tools