{
repositoryContainer.registerWorkspace(wsConfig);
}
catch (RepositoryConfigurationException e)
{
WorkspaceContainer workspaceContainer = repositoryContainer.getWorkspaceContainer(wsConfig.getName());
repositoryContainer.unregisterComponentByInstance(workspaceContainer);
repositoryContainer.unregisterComponent(wsConfig.getName());
throw new RepositoryConfigurationException(e);
}
catch (RepositoryException e)
{
WorkspaceContainer workspaceContainer = repositoryContainer.getWorkspaceContainer(wsConfig.getName());
repositoryContainer.unregisterComponentByInstance(workspaceContainer);
repositoryContainer.unregisterComponent(wsConfig.getName());
throw new RepositoryException(e);
}
}