String storeuser,
String storepassword,
String dbsystempassword,
String databaseName) throws HADBSetupException
{
HADBCreateDBInfo info = null;
try
{
String a_pw = (haAdminPassword == null ? "null" : "******");
String d_pw = (dbsystempassword == null ? "null" : "******");
String s_pw = (storepassword == null ? "null" : "******");
String s = "HADBConfigMBean.createHASchema() called with " +
"hosts=" + hosts +
", agentPort=" + agentPort +
", haAdminPassword=" + a_pw +
", haAdminPasswordFile=" + haAdminPasswordFile +
", storeuser=" + storeuser +
", storepassword=" + s_pw +
", dbsystempassword=" + d_pw +
", databaseName=" + databaseName;
getLogger().log(Level.INFO, s);
info = new HADBCreateDBInfo(
hosts,
agentPort,
haAdminPassword,
haAdminPasswordFile,
false, // auto-hadb not used
null, // portbase not used
databaseName,
getLogger(),
getConfigContext(),
getMBeanServer());
// important -- call these methods BEFORE calling setup()
info.setDatabaseUser(storeuser);
info.setDatabasePassword(storepassword);
info.setSystemPassword(dbsystempassword);
info.setup();
HADBCreateSchema creator = new HADBCreateSchema(info);
return creator.create();
}
catch(HADBSetupException hse)
{
throw hse;
}
catch(Exception e)
{
throw new HADBSetupException(e);
}
finally
{
if(info != null)
info.cleanup();
}
}