Testing the Hibernate Backend

The basic TM4J tests can all be run against the Hibernate back-end. To do this you must be using the source distribution of TM4J. You will need to create a file called hibernate.test.properties in the resource/tests subdirectory of the TM4J installation (this is the directory which contains the test topic map files and the test.properties file). The content of this file should be the initialisation properties you would normally pass into the Hibernate back-end TopicMapProviderFactory implementation (see the section called “Configuration of the Hibernate Topic Map Provider” for more details. A simple example hibernate.test.properties file is shown below.

hibernate.dialect=net.sf.hibernate.dialect.MySQLDialect
hibernate.connection.driver_class=com.mysql.jdbc.Driver
hibernate.connection.url=jdbc:mysql://localhost/tm4j-test
hibernate.connection.username=test
hibernate.connection.password=test