4 variations in the WAR file bundle are available:
ObjectDB (JPA-Implementation), Necessary license |
|
EclipseLink/DB2, see the following article |
The installation of TreeDB as a WAR file is dependant upon the application server you are using. Please consult the guidelines for server in relation to this matter.
The TreeDB configuration functions utilising the WAR concept through the web.xml file.
Notice: Statements made in further text in reference to SQL databases and their configuration, are partially not applicable for the ObjectDB, as it is not a SQL database.
Explanation of the parameters:
Values: PersistenceFramework|JPAimplementation|Database|DDLstrategy| JDBC-URL|DatabaseUser|DatabasePasswort
Examples: JPA|ECLIPSELINK|H2|UPDATE|jdbc:h2:c:/TreeDBdata/db/treedb|tree|db
Explanation: The persistence framework and the database will be written separated by a single parametre, the | character.
PersistenceLayer: – defines the persistence framework with the following possible variables: – HIBERNATE or JPA.
JPAimplementation: HIBERNATEJPA, ECLIPSELINK, OBJECTDB
With HIBERNATE serving as a persistence framework, this parameter has the value of zero.
Database: H2, DERBY, HSQLDB, MYSQL, MARIADB, POSTGRES, SQLSERVER, ORACLE, DB2,FIREBIRD, SQLITE
The corresponding JDBC driver from the programmer or developer's website for the choosen database must be installed in the \WEB-INF\lib index.
The current version of TreeDB.war-file contains a JDBC driver for the following databases: H2, MYSQL and POSTGRES.
Notice: A database and a respective user with designated rights must be set up for the respective database system. Please consult the the guidelines for your database system in reference to taking these steps.
Values: VALIDATE only validates the existing database schema without any changes
UPDATE updates the existing database schema. If no database schema exists, a database schema and the corresponding designated database will be newly set up.
CREATE sets up a new database schema and deletes all existing data.
An example of how this parameter works:
H2-Datenbank: jdbc:h2:c:/TreeDBdata/db/treedb
MySQL-Datenbank: jdbc:mysql://10.0.0.38:3306/treedb
Parameter: DBpassword is the password of the database user. These two parametres work as an authentification for the SQL database.
Variable: DEFAULT_LOCATION – TreeDB tries to dynamically generate the necessary configuration file for the specified persistence framework. If the application server does not possess content rights for the dynamic set-up of the configuration file, the parameter NO_FILE_CREATION must instead be implemented.
NO_FILE_CREATION – The necessary configuration file must be manually installed by the user:
JPA: \META-INF\persistence.xml
HIBERNATE: \hibernate.xml.cfg
TEMPORARY – This parametre only works with the HIBERNATE persistence framework. The configuration of the framework happens strictly through programming code, without needing the intermediate step of using file based configuration.
For example : http://treedb.at
Links to resources like images, videos and other data stem from this URL. Warning : serverURL does not contain the context of the application! http://treedb.at/TreeDB
When the application server is behind a reverse proxy in a network wide restricted area, the situation of TreeDB being unable to gain access through the server URL can occur. This ability is however indispensible, whenTreeDB is required to produce wkhtmltopdf PDF-files with help of the external programme. In this special circumstance, the internalURL value must be implemented. For example: http://localhost:8080
Variables: For example de_DE,en_UK
This list also works to help find a substitute for a language which is not supported by the system. Example: The users GUI language is polish and the open database only supports German and English. In this situation, the German version will be ranked accordingly in the list of language preferences.
Example:
<init-param>
<description>
DAO parameter
</description>
<param-name>database</param-name>
<param-value>HIBERNATE|null|H2|
UPDATE|jdbc:h2:c:/TreeDBdata/db/treedb|tree|db</param-value>
</init-param>
<init-param>
<description>persistence config file write strategy:
NO_FILE_CREATION,DEFAULT_LOCATION,TEMPORARY</description>
<param-name>persistenceCfgCreateStrategy</param-name>
<param-value>DEFAULT_LOCATION</param-value>
</init-param>
<init-param>
<description>Server URL</description>
<param-name>serverURL</param-name>
<param-value>http://localhost:8080</param-value>
</init-param>
<init-param>
<description>internal Server URL</description>
<param-name>internalServerURL</param-name>
<param-value>http://localhost:8080</param-value>
</init-param>
<init-param>
<description>preferred languages</description>
<param-name>preferredLanguages</param-name>
<param-value>de_DE,en_UK</param-value>
</init-param>
<init-param>
<description>TreeDB Admin password</description>
<param-name>adminPassword</param-name>
<param-value>terbiu41m</param-value>
</init-param>