populateHttpConnectionManagerProperties();
populateDebugOnTransactionManagerProp();
}
private void populateDataSourceConfigFields() {
TDataBaseConfig databaseConfig = bpsConfigDocument.getWSO2BPS().getDataBaseConfig();
if (databaseConfig != null) {
// Now we do not have concept called EMBEDDED. All the DBs are configured as EXTERNAL.
// This way users can modify the default db config as well. And also support the
// -Dsetup
dsType = DataSourceType.EXTERNAL;
if (databaseConfig.getDataSource().getName() != null &&
databaseConfig.getDataSource().getName().length() > 0) {
dataSourceName = databaseConfig.getDataSource().getName();
} else {
throw new RuntimeException("Data Source name cannot be null, " +
"when data source mode is external.");
}
TDataBaseConfig.DataSource.JNDI jndiConfig = databaseConfig.getDataSource().getJNDI();
if (jndiConfig.getContextFactory() != null &&
jndiConfig.getContextFactory().length() > 0 &&
jndiConfig.getProviderURL() != null &&
jndiConfig.getProviderURL().length() > 0) {
dataSourceJNDIRepoInitialContextFactory = jndiConfig.getContextFactory();