3 Replies Latest reply on Oct 13, 2008 12:11 PM by lpmon

    MSSQL Server, em.persist hangs, timeout (only one table)

    lpmon Novice

      I am testing an existing app with MSSQL Server. It has been up and running fine with MySQL.

      JBoss AS 4.0.5.GA
      Hibernate Core 3.3.1.GA
      Hibernate EntityManager 3.4.0.GA
      MSSQL Server 2000 and 2005 (same symptom)
      Seam 1.2.1.GA

      On an entityManager.persist() call for one particular table the call never returns. I see no error message in the log. After a long time I finally get a timeout related message. Same symptom for insert or update.

      Once this happens the table seems to be locked. I found this because I cannot access it with an SQL client after this happens. If I stop my app (the one that called persist) then I can access it with my SQL client again.

      I see this in the log: (a lot of ....closing entity managersession, then timeout message, these closing entity...... seem to be there at other times too, not just when the hang occurs)

      2008-10-12 16:37:29,558 DEBUG [org.jboss.ejb3.entity.ManagedEntityManagerFactory] ************** closing entity managersession **************
      2008-10-12 16:37:34,620 DEBUG [org.jboss.ejb3.entity.ManagedEntityManagerFactory] ************** closing entity managersession **************
      2008-10-12 16:37:34,870 WARN [org.jboss.tm.TransactionImpl] Transaction TransactionImpl:XidImpl[FormatId=257, GlobalId=w2003-dowell/109, BranchQual=, localId=109] timed out. status=STATUS_ACTIVE
      2008-10-12 16:37:35,058 WARN [org.jboss.tm.TransactionImpl] Transaction TransactionImpl:XidImpl[FormatId=257, GlobalId=w2003-dowell/110, BranchQual=, localId=110] timed out. status=STATUS_ACTIVE

      More info:

      primary key is an identity column (so are other tables that work fine)