mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 11:52:28 +01:00
engine/schema: call initDB before creating app context bean
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
parent
3883dbe9a0
commit
2f0f0e9ebc
@ -116,10 +116,6 @@ public class DatabaseCreator {
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
ClassPathXmlApplicationContext appContext = new ClassPathXmlApplicationContext(new String[] {"/com/cloud/upgrade/databaseCreatorContext.xml"});
|
||||
appContext.getBean(ComponentContext.class);
|
||||
|
||||
String dbPropsFile = "";
|
||||
List<String> sqlFiles = new ArrayList<String>();
|
||||
List<String> upgradeClasses = new ArrayList<String>();
|
||||
@ -166,13 +162,17 @@ public class DatabaseCreator {
|
||||
System.exit(1);
|
||||
}
|
||||
|
||||
initDB(dbPropsFile, rootPassword, databases, dryRun);
|
||||
|
||||
ClassPathXmlApplicationContext appContext = new ClassPathXmlApplicationContext(new String[] {"/com/cloud/upgrade/databaseCreatorContext.xml"});
|
||||
appContext.getBean(ComponentContext.class);
|
||||
|
||||
try {
|
||||
TransactionLegacy.initDataSource(dbPropsFile);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
System.exit(1);
|
||||
}
|
||||
initDB(dbPropsFile, rootPassword, databases, dryRun);
|
||||
|
||||
// Process sql files
|
||||
for (String sqlFile : sqlFiles) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user