public static int updateTask(Task task, long newModifiedAt) throws Exception {
Connection connection = null;
try {
connection = DirectTaskDatabaseConnection.getNewConnection();
return new TaskProcess(connection).updateTask(task, newModifiedAt);
} finally {
if (connection != null)
connection.close();
}
}