* Check the local repository properties values.
*/
private void checkLocalRepositoryProperties() throws Exception {
VolantisInternals internals = new VolantisInternals(volantis);
MarinerConfiguration marinerConfig = internals.getMarinerConfig();
AbstractPoliciesConfiguration defaultPolicies =
marinerConfig.getProjects().getDefaultProject().getPolicies();
// Note: the jdbc repository values are sometimes set even for
// XML, but it's not a simple decision. We just do this for now,
// we can make it more complex later if necessary.
if ("xml".equals(config.repositoryType)) {
if (config.defaultProjectPolicies != null) {
ConfigProjectPoliciesXmlValue xml =
(ConfigProjectPoliciesXmlValue)
config.defaultProjectPolicies;
Assert.assertTrue("default policies should be JDBC",
defaultPolicies instanceof XmlPoliciesConfiguration);
XmlPoliciesConfiguration xmlPolicies =
(XmlPoliciesConfiguration) defaultPolicies;
Assert.assertEquals(xml.projectDir, xmlPolicies.getDirectory());
}
} else {
if (config.defaultProjectPolicies != null) {
ConfigProjectPoliciesJdbcValue jdbc =
(ConfigProjectPoliciesJdbcValue)
config.defaultProjectPolicies;
Assert.assertTrue("default policies should be XML",
defaultPolicies instanceof JdbcPoliciesConfiguration);
JdbcPoliciesConfiguration jdbcPolicies =
(JdbcPoliciesConfiguration) defaultPolicies;
Assert.assertEquals(jdbc.projectName, jdbcPolicies.getName());
}
JDBCRepositoryConfiguration jdbcConfig =
marinerConfig.getLocalRepository()
.getJDBCRepositoryConfiguration();
ConnectionPoolConfiguration connectionPool = null;
AnonymousDataSourceConfiguration anonymousDataSource = null;
MCSDatabaseConfiguration mcsDatabase = null;