Configure repository location

By default DataCleaner monitor web application uses a file-based repository location which is relative to the deployed web archive. This makes it easy to deploy and test-drive, but it might not be the best production deployment choice.

Directory-based repository

To change the repository location, create or find the file ${user.home}/.datacleaner/datacleaner-monitor.properties . Make sure that it contains a key 'repository.file.location' and set it's value to the location you wish. For instance:

				repository.file.location=/var/datacleaner/repository
			

The repository directory approach is recommended for single-machine instances of DataCleaner monitor. If you have a cluster of DataCleaner servers please refer to the database-backed repository configuration below.

Database-backed repository

The database-backed repository approach makes it possible for multiple server instances to share the same repository. To enable it, follow these instructions.

In the configuration file ${user.home}/.datacleaner/datacleaner-monitor.properties you should first configure the following keys with the database's JDBC connection details (url, driver, username and password respectively):

				backend.datastore.jdbc.url=
				backend.datastore.jdbc.driver=
				backend.datastore.username=
				backend.datastore.password=
			

Now go to the location where DataCleaner-monitor is installed and it's .war file is exploded (in Apache Tomcat this would be the 'webapps' folder of Tomcat). Locate the file: DataCleaner-monitor/WEB-INF/classes/context/repository-context.xml . In this file you will see two bean definitions with id="repository". One of them is active (the file based) by default, and one is commented (the database variant).

Change it so that the file-based repository bean is commented and the database-backed repository is active. Also consider the two values "PUBLIC" and "BLOB". These should be changed if necesary to the schema name of your database and the data type name of BLOBs/bytes of your particular database (usually “BLOB” or “bytea”). You should end up with an element similar to this:

				<bean id="repository" class="com.hi.datacleaner.repository.DatastoreRepository" init-method="createTables">
				  <constructor-arg name="datastore" ref="backendDatastore"/>
				  <constructor-arg name="schemaName" value="PUBLIC"/>
				  <constructor-arg name="blobNativeType" value="BLOB"/>
				</bean>