diff --git a/components/application-mgt/io.entgra.device.mgt.core.application.mgt.core/src/main/java/io/entgra/device/mgt/core/application/mgt/core/task/ScheduledAppSubscriptionCleanupTask.java b/components/application-mgt/io.entgra.device.mgt.core.application.mgt.core/src/main/java/io/entgra/device/mgt/core/application/mgt/core/task/ScheduledAppSubscriptionCleanupTask.java
index e1ffb3418b..71dc4e87b0 100644
--- a/components/application-mgt/io.entgra.device.mgt.core.application.mgt.core/src/main/java/io/entgra/device/mgt/core/application/mgt/core/task/ScheduledAppSubscriptionCleanupTask.java
+++ b/components/application-mgt/io.entgra.device.mgt.core.application.mgt.core/src/main/java/io/entgra/device/mgt/core/application/mgt/core/task/ScheduledAppSubscriptionCleanupTask.java
@@ -59,4 +59,5 @@ public class ScheduledAppSubscriptionCleanupTask extends RandomlyAssignedSchedul
public String getTaskName() {
return TASK_NAME;
}
+
}
diff --git a/components/application-mgt/io.entgra.device.mgt.core.application.mgt.core/src/main/java/io/entgra/device/mgt/core/application/mgt/core/task/ScheduledAppSubscriptionTask.java b/components/application-mgt/io.entgra.device.mgt.core.application.mgt.core/src/main/java/io/entgra/device/mgt/core/application/mgt/core/task/ScheduledAppSubscriptionTask.java
index 0a1275b495..ffdce8e469 100644
--- a/components/application-mgt/io.entgra.device.mgt.core.application.mgt.core/src/main/java/io/entgra/device/mgt/core/application/mgt/core/task/ScheduledAppSubscriptionTask.java
+++ b/components/application-mgt/io.entgra.device.mgt.core.application.mgt.core/src/main/java/io/entgra/device/mgt/core/application/mgt/core/task/ScheduledAppSubscriptionTask.java
@@ -145,4 +145,5 @@ public class ScheduledAppSubscriptionTask extends RandomlyAssignedScheduleTask {
public String getTaskName() {
return TASK_NAME;
}
+
}
diff --git a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/pom.xml b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/pom.xml
index e77f9ec802..d959e96965 100644
--- a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/pom.xml
+++ b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/pom.xml
@@ -365,13 +365,6 @@
org.wso2.orbit.javax.xml.bind
jaxb-api
- 2.3.1.wso2v1
- compile
-
-
- org.wso2.orbit.javax.xml.bind
- jaxb-api
- 2.3.1.wso2v1
compile
diff --git a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/task/impl/RandomlyAssignedScheduleTask.java b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/task/impl/RandomlyAssignedScheduleTask.java
index a2d8b1ad7c..93c52d8fd0 100644
--- a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/task/impl/RandomlyAssignedScheduleTask.java
+++ b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/task/impl/RandomlyAssignedScheduleTask.java
@@ -28,8 +28,6 @@ import org.wso2.carbon.ntask.core.Task;
public abstract class RandomlyAssignedScheduleTask implements Task {
private static final Log log = LogFactory.getLog(RandomlyAssignedScheduleTask.class);
-
- private static String taskName = "UNSPECIFIED";
private static boolean qualifiedToExecuteTask = false;
private static boolean dynamicTaskEnabled = false;
@@ -40,8 +38,6 @@ public abstract class RandomlyAssignedScheduleTask implements Task {
} catch (HeartBeatManagementException e) {
log.error("Error Instantiating Variables necessary for Randomly Assigned Task Scheduling.", e);
}
- //This is done so that sub class extending this abstract class is forced to specify a task name.
- taskName = getTaskName();
setup();
}
@@ -57,15 +53,15 @@ public abstract class RandomlyAssignedScheduleTask implements Task {
if (dynamicTaskEnabled) {
try {
qualifiedToExecuteTask = DeviceManagementDataHolder.getInstance().getHeartBeatService().isQualifiedToExecuteTask();
- log.info("## NODE Qualified to execute Randomly Assigned Task : " + taskName);
- DeviceManagementDataHolder.getInstance().getHeartBeatService().updateTaskExecutionAcknowledgement(taskName);
} catch (HeartBeatManagementException e) {
- log.error("Error refreshing Variables necessary for Randomly Assigned Scheduled Task. " +
- "Dynamic Tasks will not function.", e);
+ log.error("Error refreshing variables necessary for " +
+ "Randomly Assigned Scheduled Task: " + getTaskName(), e);
}
} else {
qualifiedToExecuteTask = true;
}
+ log.info("Node is " + (qualifiedToExecuteTask ? "" : "not")
+ + " qualified to execute Randomly Assigned Task : " + getTaskName());
}
protected abstract void setup();
diff --git a/components/heartbeat-management/io.entgra.device.mgt.core.server.bootup.heartbeat.beacon/src/main/java/io/entgra/device/mgt/core/server/bootup/heartbeat/beacon/dao/impl/GenericHeartBeatDAOImpl.java b/components/heartbeat-management/io.entgra.device.mgt.core.server.bootup.heartbeat.beacon/src/main/java/io/entgra/device/mgt/core/server/bootup/heartbeat/beacon/dao/impl/GenericHeartBeatDAOImpl.java
index 1706535a6b..44a03519ed 100644
--- a/components/heartbeat-management/io.entgra.device.mgt.core.server.bootup.heartbeat.beacon/src/main/java/io/entgra/device/mgt/core/server/bootup/heartbeat/beacon/dao/impl/GenericHeartBeatDAOImpl.java
+++ b/components/heartbeat-management/io.entgra.device.mgt.core.server.bootup.heartbeat.beacon/src/main/java/io/entgra/device/mgt/core/server/bootup/heartbeat/beacon/dao/impl/GenericHeartBeatDAOImpl.java
@@ -147,7 +147,7 @@ public class GenericHeartBeatDAOImpl implements HeartBeatDAO {
}
} catch (SQLException e) {
String msg = "Error occurred while updating task list of elected server : '" +
- uuid + "' and task list " + taskList;
+ uuid + "' and task list " + taskList;
log.error(msg, e);
throw new HeartBeatDAOException(msg, e);
}
diff --git a/components/heartbeat-management/io.entgra.device.mgt.core.server.bootup.heartbeat.beacon/src/main/java/io/entgra/device/mgt/core/server/bootup/heartbeat/beacon/service/HeartBeatManagementServiceImpl.java b/components/heartbeat-management/io.entgra.device.mgt.core.server.bootup.heartbeat.beacon/src/main/java/io/entgra/device/mgt/core/server/bootup/heartbeat/beacon/service/HeartBeatManagementServiceImpl.java
index 6c737c0b2f..959a76f0f7 100644
--- a/components/heartbeat-management/io.entgra.device.mgt.core.server.bootup.heartbeat.beacon/src/main/java/io/entgra/device/mgt/core/server/bootup/heartbeat/beacon/service/HeartBeatManagementServiceImpl.java
+++ b/components/heartbeat-management/io.entgra.device.mgt.core.server.bootup.heartbeat.beacon/src/main/java/io/entgra/device/mgt/core/server/bootup/heartbeat/beacon/service/HeartBeatManagementServiceImpl.java
@@ -151,7 +151,7 @@ public class HeartBeatManagementServiceImpl implements HeartBeatManagementServic
if (candidate != null && candidate.getServerUUID().equalsIgnoreCase(localServerUUID)) {
isQualified = true;
if (log.isDebugEnabled()) {
- log.debug("Node : " + localServerUUID + " Qualified to execute randomly assigned task.");
+ log.debug("Node : " + localServerUUID + " is qualified to execute randomly assigned task.");
}
}
} catch (HeartBeatDAOException e) {
diff --git a/components/task-mgt/task-manager/io.entgra.device.mgt.core.task.mgt.core/src/main/java/io/entgra/device/mgt/core/task/mgt/core/service/TaskManagementServiceImpl.java b/components/task-mgt/task-manager/io.entgra.device.mgt.core.task.mgt.core/src/main/java/io/entgra/device/mgt/core/task/mgt/core/service/TaskManagementServiceImpl.java
index 53d19105df..2b5a521507 100755
--- a/components/task-mgt/task-manager/io.entgra.device.mgt.core.task.mgt.core/src/main/java/io/entgra/device/mgt/core/task/mgt/core/service/TaskManagementServiceImpl.java
+++ b/components/task-mgt/task-manager/io.entgra.device.mgt.core.task.mgt.core/src/main/java/io/entgra/device/mgt/core/task/mgt/core/service/TaskManagementServiceImpl.java
@@ -385,7 +385,6 @@ public class TaskManagementServiceImpl implements TaskManagementService {
dynamicTask.setProperties(dynamicTaskPropDAO.getDynamicTaskProps(dynamicTask.getDynamicTaskId(),
tenantId));
}
- TaskManagementDAOFactory.commitTransaction();
} catch (TaskManagementDAOException e) {
String msg = "Error occurred while fetching dynamic task '" + dynamicTaskId + "'";
log.error(msg, e);
diff --git a/pom.xml b/pom.xml
index dc526efe6c..1be80b1b60 100644
--- a/pom.xml
+++ b/pom.xml
@@ -894,6 +894,12 @@
${jaxb.api.version}
test
+
+ org.wso2.orbit.javax.xml.bind
+ jaxb-api
+ 2.3.1.wso2v1
+ compile
+
org.apache.axis2.transport