Hibernate sess.flush()挂起

时间:2013-08-29 23:35:41

标签: java sql hibernate

我有一个加载持久对象的方法然后更新它。当我使用flush()时,进程挂起而没有错误。有什么想法吗?

代码:

    public Task changeStatus(Long taskNo, String status) {
    Session sess = HibernateUtil
            .getSessionFactory()
            .openSession();
    Task task = (Task) sess.load(Task.class, taskNo);

    task.setStatus(status);

    sess.flush();
    return task;
}

日志显示:

  

INFO:09:33:05,329 DEBUG打印机:83 - 列出实体:

     

INFO:09:33:05,329 DEBUG Printer:90 - models.Task {userByAssignedToCheck = null,client = models.Client#1,status = Withdrawn,datasets =,urgent = false,taskLogs =,userByCheckedBy = null,dateReceived = 2013年8月29日,dateCompleted = null,fee = null,onTime = false,userByOriginatorId = models.User#1,taskCat = null,userByAssignedToWork = null,source = null,originatorOld = null,description = null,userByCompletedBy = null,method = null,taskNo = 11492,dueDate = null,requestVia = null,comments =}

     

INFO:09:33:05,329 DEBUG AbstractBatcher:366 - 即将打开PreparedStatement(打开PreparedStatements:0,全局:0)

     

INFO:09:33:05,329 DEBUG SQL:401 - / * update models.Task * / update DBAKZHU0.INFO_TASK set CLIENTNO =?,ASSIGNEDTOCHECK =?,TASKTYPENO =?,COMPLETEDBY = ?, CHECKEDBY = ?, ORIGINATORID = ?,SOURCENO =?,ASSIGNEDTOWORK = ?, METHOD = ?, REQUESTVIA = ?, DATERECEIVED = ?, DATECOMPLETED = ?, DUEDATE =?,STATUS = ?, ORIGINATOROLD = ?, ONTIME = ?, URGENT =?,FEE = ?, DESCRIPTION =? TASKNO =?

     

INFO:Hibernate:/ * update models.Task * / update DBAKZHU0.INFO_TASK set CLIENTNO =?,ASSIGNEDTOCHECK = ?, TASKTYPENO =?,COMPLETEDBY = ?, CHECKEDBY = ?, ORIGINATORID = ?, SOURCENO =?,ASSIGNEDTOWORK = ?,METHOD = ?, REQUESTVIA = ?, DATERECEIVED = ?, DATECOMPLETED = ?, DUEDATE = ?, STATUS = ?, ORIGINATOROLD = ?, ONTIME = ?, URGENT = ?, FEE = ?, DESCRIPTION =? TASKNO =?

0 个答案:

没有答案