String workspaceName = manager.getLifeCycle().getWorkspaceName();
ManageableRepository repo = repositoryService.getCurrentRepository();
session = repo.getSystemSession(workspaceName);
bridge.start(session);
} catch (RepositoryException e) {
throw new UndeclaredRepositoryException(e);
} finally {
if (session != null) {
session.logout();
}
}