PropertiesParam props = new PropertiesParam();
props.setProperty("dialect", "auto");
props.setProperty("source-name", "jdbcjcr");
JDBCConfigurationPersister persiter = new JDBCConfigurationPersister();
persiter.init(props);
IBindingFactory bfact = BindingDirectory.getFactory(RepositoryServiceConfiguration.class);
IMarshallingContext mctx = bfact.createMarshallingContext();
OutputStream saveStream = new ByteArrayOutputStream();
mctx.marshalDocument(repositoryService.getConfig(), "ISO-8859-1", null, saveStream);
saveStream.close();
persiter.write(new ByteArrayInputStream(((ByteArrayOutputStream)saveStream).toByteArray()));
IBindingFactory factory = BindingDirectory.getFactory(RepositoryServiceConfiguration.class);
IUnmarshallingContext uctx = factory.createUnmarshallingContext();
RepositoryServiceConfiguration storedConf =
(RepositoryServiceConfiguration)uctx.unmarshalDocument(persiter.read(), null);
for (int i = 0; i < theadsCount; i++)
{
// test if respository has been created
ManageableRepository repository = threads[i].getRepository();