fix instansiating of device provider serviceImpl with empty plugin repo

revert-70aa11f8
manoj 9 years ago
parent a2dc916fd0
commit 856fea3455

@ -130,9 +130,6 @@ public class DeviceManagementServiceComponent {
/* Initializing app manager connector */ /* Initializing app manager connector */
this.initAppManagerConnector(); this.initAppManagerConnector();
DeviceManagementProviderService deviceManagementProvider =
new DeviceManagementProviderServiceImpl(this.getPluginRepository());
DeviceManagementDataHolder.getInstance().setDeviceManagementProvider(deviceManagementProvider);
OperationManagementDAOFactory.init(dsConfig); OperationManagementDAOFactory.init(dsConfig);
/* If -Dsetup option enabled then create device management database schema */ /* If -Dsetup option enabled then create device management database schema */
@ -203,8 +200,11 @@ public class DeviceManagementServiceComponent {
} }
/* Registering Device Management Service */ /* Registering Device Management Service */
BundleContext bundleContext = componentContext.getBundleContext(); BundleContext bundleContext = componentContext.getBundleContext();
DeviceManagementProviderService deviceManagementProvider =
new DeviceManagementProviderServiceImpl(this.getPluginRepository());
DeviceManagementDataHolder.getInstance().setDeviceManagementProvider(deviceManagementProvider);
bundleContext.registerService(DeviceManagementProviderService.class.getName(), bundleContext.registerService(DeviceManagementProviderService.class.getName(),
new DeviceManagementProviderServiceImpl(), null); deviceManagementProvider, null);
APIPublisherService publisher = new APIPublisherServiceImpl(); APIPublisherService publisher = new APIPublisherServiceImpl();
DeviceManagementDataHolder.getInstance().setApiPublisherService(publisher); DeviceManagementDataHolder.getInstance().setApiPublisherService(publisher);

@ -55,7 +55,7 @@ public class DeviceMgtUserServiceComponent {
} }
/* Registering User Management service */ /* Registering User Management service */
BundleContext bundleContext = componentContext.getBundleContext(); BundleContext bundleContext = componentContext.getBundleContext();
bundleContext.registerService(org.wso2.carbon.device.mgt.user.core.UserManager.class, bundleContext.registerService(org.wso2.carbon.device.mgt.user.core.UserManager.class.getName(),
new org.wso2.carbon.device.mgt.user.core.service.UserManagementService(), null); new org.wso2.carbon.device.mgt.user.core.service.UserManagementService(), null);
if (log.isDebugEnabled()) { if (log.isDebugEnabled()) {
log.debug("User management core bundle has been successfully initialized"); log.debug("User management core bundle has been successfully initialized");

Loading…
Cancel
Save