RimuDB Logo
Database Access Framework for Java

Frequently Asked Questions

Where does the name RimuDB come from?

Rimu is the name of a tree native to New Zealand. It is pronounced Reemoo.

Does RimuDB work with Spring?

Yes. The following is an example configuration that can be used to construct a CompoundDatabase. The compoundDatabase can then be used in another bean configuration. The DatabaseCredentials bean provides a means to set up the credentials for multiple database connections.

<bean id="credential_staging" class="org.rimudb.DatabaseCredentials">
	<property name="databaseID" value="jupiter-server" />
	<property name="userID" value="myuserid" />
	<property name="password" value="mypassword" />

<bean id="credential_production" class="org.rimudb.DatabaseCredentials">
	<property name="databaseID" value="mars-server" />

<bean id="compoundDatabase" class="org.rimudb.CompoundDatabase" init-method="connectUsingCredentials">
	<constructor-arg value="classpath:/jnlpmaint-compounddb.xml"/>
	<constructor-arg value="true"/>
	<property name="credentialList" >
		<list value-type="org.rimudb.DatabaseCredentials">
			<ref bean="credential_staging"/>
			<ref bean="credential_production"/>

How can I suppress the connection messages in the log?

The c3p0 connection pool framework logs connection information when a connection is established. The connection information includes the JDBC URL. This may include a user and password, so may be unsuitable for inclusion in a log file.

If you are using log4j, then logging of this message can be hidden by using the following configuration:

<logger name="com.mchange">
    <level value="warn"/>

Which connection pool should I use?

If you want to control the connection pooling within your application program then RimuDB supports both C3P0 (http://www.mchange.com/projects/c3p0/) and Apache DBCP (http://commons.apache.org/dbcp/). C3P0 seems to be much more reliable, and has better configuration options. For this reason most of the documentation examples use C3P0.

If you are running your application in a container (i.e. a servlet or Spring etc) and there is a container connection pool configured, then you can use the JNDI Connection Pool. The details of how to configure all these pools are in the Compound Database XML section of the documentation. The JNDI Connection Pool was added in release 1.2.0.

RimuDBException when attempting to update or select a record in an Oracle database with a CHAR data type

When connecting to an Oracle database, a RimuDBException that looks similar to the following is thrown:

This record has already been changed by another process. Change was not processed. Changed values: 
Changed Properties [Original: name='NAME-3'] [Current: name='NAME-3                        ']
This is caused by Oracle automatically blank padding values in CHAR data types. In order to correct this behavior, use the JDBC property 'FixedString=true'. For instance:

   <database group="groupa" id="dbid-1">
            	<property name="fixedString" value="true"/>
      <logging threshold_ms="0" type="sql-only"/>

Note that support for Properties in the compound database configuration file was added in release 1.3.6.

Why does my connection to SQL Server 2008 R2 hang?

There is a known problem with Java 1.6.0_29 and SQL Server 2008 R2. See this link for details and a work around.

How can I get a list of all the table names from RimuDB table descriptors?

In Python:

import fileinput
import re
import glob
e = re.compile('table="([^"]+)"')
for line in fileinput.input(glob.glob("*.xml")):
   m = e.search(line)
   if m:
      print m.group(1)