// migration service
persister = new JCRPersister(container, JCRPersister.WSRP_WORKSPACE_NAME);
persister.initializeBuilderFor(JCRMigrationService.mappingClasses);
MigrationService migrationService = new JCRMigrationService(persister);
migrationService.setStructureProvider(structureprovider);
consumerRegistry.setMigrationService(migrationService);
// wait 'delay' seconds before starting the consumers to give JBoss WS a chance to publish the WSDL and not deadlock
ScheduledExecutorService scheduledExecutorService = Executors.newScheduledThreadPool(1);
scheduledExecutorService.schedule(new Runnable() {