|
|
@ -259,10 +259,11 @@ public class WindowsDeviceManager implements DeviceManager {
|
|
|
|
boolean status;
|
|
|
|
boolean status;
|
|
|
|
MobileDevice mobileDevice = MobileDeviceManagementUtil.convertToMobileDevice(device);
|
|
|
|
MobileDevice mobileDevice = MobileDeviceManagementUtil.convertToMobileDevice(device);
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
WindowsDAOFactory.getConnection();
|
|
|
|
WindowsDAOFactory.beginTransaction();
|
|
|
|
status = daoFactory.getMobileDeviceDAO().addMobileDevice(mobileDevice);
|
|
|
|
status = daoFactory.getMobileDeviceDAO().addMobileDevice(mobileDevice);
|
|
|
|
WindowsDAOFactory.commitTransaction();
|
|
|
|
WindowsDAOFactory.commitTransaction();
|
|
|
|
} catch (MobileDeviceManagementDAOException e) {
|
|
|
|
} catch (MobileDeviceManagementDAOException e) {
|
|
|
|
|
|
|
|
WindowsDAOFactory.rollbackTransaction();
|
|
|
|
throw new DeviceManagementException("Error while enrolling the Windows device '" +
|
|
|
|
throw new DeviceManagementException("Error while enrolling the Windows device '" +
|
|
|
|
device.getDeviceIdentifier() + "'", e);
|
|
|
|
device.getDeviceIdentifier() + "'", e);
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|