Remove delete device type from DB when un register plugin

revert-70aa11f8
manoj 10 years ago
parent a774bc89aa
commit f4b8e4bb74

@ -45,12 +45,6 @@ public class DeviceManagementRepository {
public void removeDeviceManagementProvider(DeviceMgtService provider) throws DeviceManagementException {
String deviceType = provider.getProviderType();
try {
DeviceManagerUtil.unregisterDeviceType(deviceType);
} catch (DeviceManagementException e) {
throw new DeviceManagementException("Error occurred while removing device management provider '" +
deviceType + "'", e);
}
providers.remove(deviceType);
}

@ -142,7 +142,7 @@ public final class DeviceManagerUtil {
try {
DeviceTypeDAO deviceTypeDAO = DeviceManagementDAOFactory.getDeviceTypeDAO();
DeviceType deviceType = deviceTypeDAO.getDeviceType(typeName);
if (deviceType == null) {
if (deviceType != null) {
DeviceType dt = new DeviceType();
dt.setName(typeName);
deviceTypeDAO.removeDeviceType(typeName);

Loading…
Cancel
Save