Resource Setup

The data sources can as well be specified in one of this three ways:

If the setting cannot be made in one of this ways, the corresponding row in the table is omitted.

*In the ibo-config.xml file every data source is assigned a name using the attribute name. One of these names has a special meaning and is reserved: SJDO_DEFAULT . This is the data source, that is used for all operations that were not assigned to an explicit data source. This is also the standard data source for PersistenceManagerFactory .

**Please notice, that the name of the constant in the PersistenceManagerFactoryProperties class (see Configuration With An Option File) associated to the property name equals the property name using '_' instead the '.', for example: "javax.jdo.option.ConnectionURL" --> PersistenceManagerFactoryProperties.javax_jdo_option_ConnectionURL.

Contents Resource Setup

JDBC

The following example shows how to define a data source of type jdbc in the ibo-config.xml file:

<node name="resource-entry">
  <entry key="type" value="jdbc"/>
  <entry key="name" value="SJDO_DEFAULT"/>
  <entry key="driver-name" value="oracle.jdbc.driver.OracleDriver"/>
  <entry key="url" value="jdbc:oracle:thin:*** "/>
  <entry key="username" value="****"/>
  <entry key="password" value="****"/>
  <node name="database-support">
     <entry key="class-name" value="com.signsoft.ibo.dbsupport.oracle10x.OracleDatabaseInfo" />
     <entry key="rules" value="/dbsupport_oracle10.xml" />
  </node>
  <entry key="transactional" value="true"/>
  <entry key="transaction-isolation-level" value="TRANSACTION_SERIALIZABLE" />
</node>

The entry with the key 'type' and the value 'jdbc' marks the datasource as a JDBC datasource.

The entry with the key 'name' and the value 'SJDO_DEFAULT' marks the datasource as the standard data source for PersistenceManagerFactory.

The other settings have the following meanings:

URL

The URL for all connections to the database. Please use the standard JDBC notation or the notation of your database vendor for this attribute.

ibo-config syntax <entry key="url" value="<a valid url>"/>
key url
value A valid URL for all connections to the database. Please use the standard JDBC notation or the notation of your database vendor for this attribute.
default -
method name PersistenceManagerFactory.setConnectionURL
value see above
property name javax.jdo.option.ConnectionURL
value see above

Driver name

The driver class to connect to the database.

ibo-config syntax <entry key="driver-name" value="<a driver name>"/>
key driver-name
value The name of the driver class to connect to the database.
default -
method name PersistenceManagerFactory.setConnectionDriverName
value see above
property name javax.jdo.option.ConnectionDriverName
value see above

Database support

In the ibo-config.xml there is a special node with name "database-support" to make settings for the Signsoft intelliBO database support driver. This is an example for such a node:

  <node name="database-support">
    <entry key="class-name" value="com.signsoft.ibo.dbsupport.h2.H2DatabaseInfo" />
    <entry key="rules" value="/dbsupport_h2.xml" />
  </node>

class name

The name of the driver class for the Signsoft intelliBO database drivers. This entry can only appear inside the database-support node.

ibo-config syntax <entry key="class-name" value="<a dbsupport driver name>"/>
key class-name
value The name of the driver class for the Signsoft intelliBO database drivers.
default -
method name PersistenceManagerFactoryImpl.setDatabaseSupportClassName()
value see above
property name com.signsoft.ibo.option.ConnectionInfoName
value see above

rules

The basename of the XML file corresponding to the Signsoft intelliBO database support driver. This entry can only appear inside the database-support node.

ibo-config syntax <entry key="rules" value="<name of the dbsupport rules file>"/>
key rules
value The basename of the XML file corresponding to the Signsoft intelliBO database support driver. The format of this setting is now explicitly something like "/dbupport_xxx.xml".
default -
method name PersistenceManagerFactoryImpl.setDatabaseSupportRules()
value see above

Description

Optional you may add a description of the datasource, but only in the ibo-config.xml file.

ibo-config syntax <entry key="description" value="<description of the data source>"/>
key description
value The description of the data source.
default empty

Username

Here you can specify an username for opening the datasource connection.

ibo-config syntax <entry key="username" value="<an user name>"/>
key username
value The user name for opening the connection.
default empty
method name PersistenceManagerFactory.setConnectionUserName
value see above
property name javax.jdo.option.ConnectionUserName
value see above

Password

Here you can specify a password for opening the datasource connection.

ibo-config syntax <entry key="password" value="<a password>"/>
key password
value The password for opening the connection.
default empty
method name PersistenceManagerFactory.setConnectionPassword
value see above
property name javax.jdo.option.ConnectionPassword
value see above

Encrypted username

Optional you can specify an encrypted username for opening the datasource connection in the ibo-config.xml.

ibo-config syntax <entry key="encrypted-username" value="<an encrypted user name>"/>
key encrypted-username
value The username encrypted.
default empty

Encrypted password

Optional you can specify an encrypted password for opening the datasource connection in the ibo-config.xml.

ibo-config syntax <entry key="encrypted-password" value="<an encrypted password>"/>
key encrypted-password
value The password encrypted.
default empty

Transactional

With this flag set to false, you can specify non-transactional connections.

ibo-config syntax <entry key="transactional" value="true|false"/>
key transactional
value false...the connection should be used only for nontransactional connections
true...the connection can be used for transactional and nontransactional connections
default true

Transaction isolation level

Determines the transaction isolation level for this connection.

ibo-config syntax <entry key="transaction-isolation-level" value="<an user name>"/>
key transaction-isolation-level
value The allowed values are the names of the constants defined in the interface java.sql.Connection:

TRANSACTION_READ_UNCOMMITTED
TRANSACTION_READ_COMMITTED
TRANSACTION_REPEATABLE_READ
TRANSACTION_SERIALIZABLE

Detailed information about the semantics of these values can be found in the Java API documentation.
default use default database setting
method name IBOPersistenceManagerFactory.setTransactionIsolation
value see above

Pool configuration

A connection pool might be assigned to each JDBC datasource. So, JDBC connections (physical) could be reused, which dramatically increases the execution speed of your application.

In the ibo-config.xml there is a special node with name "pool-configuration", which can be set inside a "resource-entry" node for a JDBC datasource. This is an example for such a "pool-configuration" node:

  <node name="pool-configuration">
    <entry key="login-delay" value="0"/>
    <entry key="minimum-size" value="1"/>
    <entry key="maximum-size" value="5"/>
    <entry key="increase-size" value="1"/>
    <entry key="shrink-size" value="1"/>
    <entry key="shrink-frequency" value="0"/>
    <entry key="test-statement" value="SELECT 1 FROM DUAL"/>
    <entry key="test-on-aquire-frequency" value="1"/>
    <entry key="test-on-return-frequency" value="0"/>
  </node>

The attributes and elements have the following meaning:

login-delay

Specifies, how long the pool waits in milliseconds before opening a new physical connection to the database.

ibo-config syntax <entry key="login-delay" value="<time in ms>"/>
key login-delay
value waiting time in ms
default 0
method name PersistenceManagerFactoryImpl.getConnectionPoolConfiguration().setLoginDelay
value see above

minimum-size

Specifies the minimum connection pool size.

ibo-config syntax <entry key="minimum-size" value="<minimum pool size>"/>
key minimum-size
value minimum pool size (>=1)
default 1
method name PersistenceManagerFactoryImpl.getConnectionPoolConfiguration().setMinimumSize
value see above

increase-size

Specifies the number of connections which are opened at once while increasing the pool.

ibo-config syntax <entry key="increase-size" value="<minimum pool size>"/>
key increase-size
value number of connections which are opened at once while increasing the pool (>=1)
default 1
method name PersistenceManagerFactoryImpl.getConnectionPoolConfiguration().setIncreaseSize
value see above

maximum-size

Specifies the maximum pool size.

ibo-config syntax <entry key="maximum-size" value="<maximum pool size>"/>
key maximum-size
value maximum pool size (>=1)
default 5
method name PersistenceManagerFactoryImpl.getConnectionPoolConfiguration().setMaximumSize
value see above

shrink-size

Specifies the number of connections which are closed at once while shrinking the pool.

ibo-config syntax <entry key="shrink-size" value="<shrink size>"/>
key shrink-size
value number of connections which are closed at once while shrinking the pool (>=1)
default 1
method name PersistenceManagerFactoryImpl.getConnectionPoolConfiguration().setShrinkSize
value see above

shrink-frequency

Specifies the time in milliseconds between subsequent attempts to shrink the pool.

ibo-config syntax <entry key="shrink-frequency" value="<time in ms>"/>
key shrink-frequency
value -1...disables shrinking completely
0...forces instant shrinking until the minimum size is reached.
>0...time in milliseconds between subsequent attempts to shrink the pool
default -1
method name PersistenceManagerFactoryImpl.getConnectionPoolConfiguration().setShrinkFrequency
value see above

test-statement

Optional SQL statement to use for connection health testing.

ibo-config syntax <entry key="test-statement" value="<sql statement>"/>
key test-statement
value sql statement to test connection
default empty
method name PersistenceManagerFactoryImpl.getConnectionPoolConfiguration().setTestStatement
value see above

test-on-aquire-frequency

Specifies the frequency of tests on connections aquired from the pool using the test statement, e.g. a value of 2 force a check on every second aquired connection. If the test fails, the connection will be closed and the next connection from the pool will be fetched repeatedly until the test finally passes or no more connections are left in the pool and establishing and testing new database connections (e.g. to assure the minimum pool size) fail too. The latter case causes an exception to be thrown and indicates that either the database is currently not available or an invalid test statement has been specified.

ibo-config syntax <entry key="test-on-aquire-frequency" value="<frequency of tests>"/>
key test-on-aquire-frequency
value ≤0...disables this part of connection testing
>0...frequency of tests on connections
default -1
method name PersistenceManagerFactoryImpl.getConnectionPoolConfiguration().setTestOnAquireFrequency
value see above

test-on-return-frequency

Specifies the frequency of tests on connections returned to the pool using the test statement, e.g. a value of 2 forces checks on every second connection. If the test fails, the connection will be closed and not returned to the pool. In case that the number of connections in the pool falls below the minimum pool size, new connections will be opened during the next attempt to aquire a connection from the pool.

ibo-config syntax <entry key="test-on-return-frequency" value="<frequency of tests>"/>
key test-on-return-frequency
value ≤0...disables this part of connection testing
>0...frequency of tests on connections
default -1
method name PersistenceManagerFactoryImpl.getConnectionPoolConfiguration().setTestOnReturnFrequency
value see above

JNDI Named Datasource

To specify a JNDI name for a data source use the type named ds as shown in the sample below:

<node name="resource-entry">
  <entry key="type" value="ds"/>
  <entry key="name" value="SJDO_DEFAULT"/>
  <entry key="jndi-name" value="java:comp/env/jdbc/DataSourceJNDI />
  <node name"database-support">
    <entry key="class-name"
      value="com.signsoft.ibo.dbsupport.oracle81x.OracleDatabaseInfo" />
    <entry key="native-connection-provider-name"
      value="package com.signsoft.ibo.dbsupport.weblogic9x.WLNativeConnectionProvider" />
  </node>
</node>

Possible entry keys are: name,type (value="ds"), dbsupport-name,description, username, password, encrypted username, encrypted password, transactional

These entries are already described for the JDBC datasource. There is only an additional entry for the JNDI name:

JNDI name

The JNDI name under which the data source can be reached.

ibo-config syntax <entry key="jndi-name" value="<jndi name>"/>
key jndi-name
value JNDI name under which the data source can be reached.
default -

Native Connection Provider

The name of the class which provides access to a native database connection. This might be necessary in application server environments (e.g. BEA WebLogic) to provide full support of LOBs.

ibo-config syntax <entry key="native-connection-provder-name" value="<class name>"/>
key native-connection-provder-name
value class name of the native connection provider
default -

JNDI Named XA Datasource

To specify a JNDI name for a XA data source use the type named xa.

The other attributes are the same as described for the JNDI Named Datasource.

Connector Datasource*

Please note: this is only a feature of the Signsoft intelliBO Professional version.

To specify a JNDI name of a J2EE Connector data source use the type jca as shown below:

<node name="resource-entry">
  <entry key="type" value="jca"/>
  <entry key="name" value="SJDO_DEFAULT"/>
  <entry key="connection-factory"
    value="com.acme.ACMEConnectionFactory "/>
  <node name"database-support">
    <entry key="class-name"
      value="com.signsoft.ibo.dbsupport.oracle81x.OracleDatabaseInfo" />
  </node>
</node>

Possible entry keys are: name,type (value="jca"), dbsupport-name,description, transactional

These entries are already described for the JDBC datasource. There is only an additional entry for the "connection-factory" name:

Connection Factory

The class name of the connection factory.

ibo-config syntax <entry key="connection-factory" value="<a class name>"/>
key connection-factory
value The class name of the connection factory.
default -
method name PersistenceManagerFactory.setConnectionFactoryName*
value see above
property name javax.jdo.option.ConnectionFactoryName*
value see above

*For a non-transactional datasource you have to use the method PersistenceManagerFactory.setConnectionFactory2Name and the property called javax.jdo.option.ConnectionFactory2Name instead.

Non-Transactional Data Source

For every data source a separate non-transactional data source can be defined. If you do non-transactional operations Signsoft intelliBO can use that data source instead of the transactional data source.

The definition of such a data source follows the same rules as described above except that the entry ''transactional'' is set to false .

The following example shows how to use a non-transactional connector:

<node name="resource-entry">
  <entry key="type" value="jca"/>
  <entry key="name" value="SJDO_DEFAULT"/>
  <entry key="connection-factory"
    value=" com.acme.ACMEConnectionFactory "/>
  <node name"database-support">
    <entry key="class-name"
      value="com.signsoft.ibo.dbsupport.oracle81x.OracleDatabaseInfo" />
  </node>
  <entry key="transactional" value="false"/>
</node>