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...)
Current revision (08:48, 11 April 2009) (edit) (undo)
 

(4 intermediate revisions not shown.)

Line 7:

Line 7:

You can also save this files to make backups of a particular database state.
You can also save this files to make backups of a particular database state.
 +
AVAILABLE SINCE 5.1.0.0
== How to: ==
== How to: ==
-
To enable the development mode in your batch server you just have to add the following line in your config.properties (see [[Ubik_Batch_Server_Administration_Guide|installation guide]]):
+
To enable the development mode in your batch server you just have to add the following line in your config.properties (see [[Ubik_Batch_Server_Administration_Guide#Batch Server General configuration |administration guide]]):
config.properties:
config.properties:
-
<source lang="txt">
+
<source lang="text">
...
...
DEVELOPMENT_MODE=true
DEVELOPMENT_MODE=true

Line 57:

Line 58:

Example of startup log in development mode:
Example of startup log in development mode:
-
<source lang="shell">
+
<source lang="text">
...
...
starting naming service
starting naming service

Line 69:

Line 70:

...
...
</source>
</source>
 +
 +
[[Category:Ubik Batch Server]]

Current revision

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.

AVAILABLE SINCE 5.1.0.0

How to:

To enable the development mode in your batch server you just have to add the following line in your config.properties (see administration 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:

...
 starting naming service
 naming service started
 starting connector ...
 connector started  ...
 server started ...
 Development mode actived...
 Starting database creation script for development mode...
 Database creation succeded for development mode
 ...
Personal tools