In the system configuration file ibo-config.xml the global settings for Signsoft intelliBO are made. This includes configurations of the database as well as transaction control or logging. Please note that these global properties substitutes all other configuration settings. If there are no further instructions, the default settings are used. But you have to define a data source in either case.
During initialisation Signsoft intelliBO analysed the CLASSPATH and looks for the first occurrence of a file with the name ibo-config.xml . So we recommend you to create the file in the lib -directory of your project. Every sample provides a ibo-config.xml file in its /src/conf directory, which could serve as a template for you.
To configure the data source you have to set the following parameters in a tag called <node name="resource-entry"> :
<node name="resource-entry">
<entry key="type" value="jdbc" />
<entry key="name" value="SJDO_DEFAULT" />
<entry key="driver-name" value="org.h2.Driver" />
<entry key="url" value="jdbc:h2:database/data" />
<entry key="username" value="" />
<entry key="password" value="" />
<node name="database-support">
<entry key="class-name" value="com.signsoft.ibo.dbsupport.h2.H2DatabaseInfo" />
<entry key="rules" value="/dbsupport_h2.xml" />
</node>
</node>
Some annotations:
| type: | type of the data source, always jdbc |
| name: | name of the data source; in this case the reserved term SJDO_DEFAULT marks the data source as default data source for the persistence manager as well as data source for all operations, which are not explicitly assigned to another datasource. |
| driver-name : | database driver; you can find the H2 database driver h2.jar in directory /thirdparty/h2/lib |
| url: | URL of the database |
| database-support: | Information about the Signsoft intelliBO database support driver, contains: class-name: class name of the Signsoft intelliBO database support driver corresponding to the database rules: basename of the Signsoft intelliBO database support driver corresponding to the database |
We do not need to set a user or password in this case.
You can make more configuration settings in this file (see also chapter "System Configuration"), but we will restrict here to additional activate the logging.
Your ibo-config.xml file shall now look like this:
<?xml version="1.0" encoding="UTF-8"?>
<ibo>
<logging enabled="true" >
<domain name="IBO.SQL" />
<domain name="IBO.CORE" />
</logging>
<node name="resource-entry">
<entry key="type" value="jdbc" />
<entry key="name" value="SJDO_DEFAULT" />
<entry key="driver-name" value="org.h2.Driver" />
<entry key="url" value="jdbc:h2:database/data" />
<entry key="username" value="" />
<entry key="password" value="" />
<node name="database-support">
<entry key="class-name" value="com.signsoft.ibo.dbsupport.h2.H2DatabaseInfo" />
<entry key="rules" value="/dbsupport_h2.xml" />
</node>
</node>
</ibo>
You can find more information about the system configuration in the chapter "System Configuration".