mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Fix OSGI service unbinding issue
This commit is contained in:
parent
f2243ebd0e
commit
ac3e144437
@ -118,18 +118,18 @@ public class DeviceManagementDataHolder {
|
|||||||
|
|
||||||
public void setRealmService(RealmService realmService) {
|
public void setRealmService(RealmService realmService) {
|
||||||
this.realmService = realmService;
|
this.realmService = realmService;
|
||||||
this.setTenantManager(realmService);
|
setTenantManager(realmService != null ?
|
||||||
|
realmService.getTenantManager() : null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public TenantManager getTenantManager() {
|
public TenantManager getTenantManager() {
|
||||||
return tenantManager;
|
if (tenantManager == null) {
|
||||||
|
throw new IllegalStateException("Tenant manager is not initialized properly");
|
||||||
}
|
}
|
||||||
|
return tenantManager; }
|
||||||
|
|
||||||
private void setTenantManager(RealmService realmService) {
|
private void setTenantManager(TenantManager tenantManager) {
|
||||||
if (realmService == null) {
|
this.tenantManager = tenantManager;
|
||||||
throw new IllegalStateException("Realm service is not initialized properly");
|
|
||||||
}
|
|
||||||
this.tenantManager = realmService.getTenantManager();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public DeviceManagementProviderService getDeviceManagementProvider() {
|
public DeviceManagementProviderService getDeviceManagementProvider() {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user