continue;
}
if (!getDatabaseType(wsEntry).equals(dbType))
{
throw new RepositoryConfigurationException("All workspaces must be of same DB type. But "
+ wsEntry.getName() + "=" + getDatabaseType(wsEntry) + " and " + wsConfig.getName() + "=" + dbType);
}
// source name
String wsSourceName = null;
String newWsSourceName = null;
try
{
wsSourceName = wsEntry.getContainer().getParameterValue("sourceName");
newWsSourceName = wsConfig.getContainer().getParameterValue("sourceName");
}
catch (RepositoryConfigurationException e)
{
if (LOG.isTraceEnabled())
{
LOG.trace("An exception occurred: " + e.getMessage());
}
}
if (wsSourceName != null && newWsSourceName != null)
{
if (dbType.isShareSameDatasource())
{
if (!wsSourceName.equals(newWsSourceName))
{
throw new RepositoryConfigurationException("SourceName must be equals in " + dbType
+ "-database repository." + " Check " + wsEntry.getName() + " and " + wsConfig.getName());
}
}
else
{
if (wsSourceName.equals(newWsSourceName))
{
throw new RepositoryConfigurationException("SourceName " + wsSourceName + " already in use in "
+ wsEntry.getName() + ". SourceName must be different in " + dbType
+ "-database structure type. Check configuration for " + wsConfig.getName());
}
}