String configFile = CarbonUtils.getCarbonConfigDirPath() + "/" + BILLING_CONFIG;
BillingConfiguration billingConfiguration = new BillingConfiguration(configFile);
DataSource dataSource = billingConfiguration.getDataSource();
assertNotNull("data should be not null", dataSource);
BillingManager billingManager = new BillingManager(billingConfiguration);
try {
if (BillingManager.getInstance() != null) {
BillingManager.destroyInstance();
}
} catch (Exception e) {
}
//billingManager.scheduleBilling();
billingEngine = billingManager.getBillingEngine(SELLER_ID);
}