3 Replies Latest reply on Feb 8, 2002 10:56 PM by David Jencks

    Using DB2 in JBoss causing lock problems

    Bernard Lavallee Newbie

      I am currently trying to switch over from Informix to DB2 on a large EJB application using JBoss as the app server. I am encountering the following problem a locking problem that hangs JBoss. For example, I could be doing a normal set of deletes against DB2 when for some unknown reason, it fails to do the correct number of expected deletes and hangs JBoss, even when I attempt to close JBoss down.

      Any ideas out there!!!

        • 1. Re: Using DB2 in JBoss causing lock problems
          David Jencks Master

          deletes through jboss or db2 directly? What lock problems are causing it to hang? more details please. What jboss?

          • 2. Re: Using DB2 in JBoss causing lock problems
            Bernard Lavallee Newbie

            I am using JBoss 2.4.3 with Tomcat 3.2.3. My application runs agains jdk1.3 using DB2 7. the problems I am having are centered around the Minerva pool and are not restricted to deletes. It also happens with adds and updates to DB2. Even worse, it's intermittent. I am using the .app driver for DB2.

            I pull a connection from Minerva, make a series of adds to DB2 and close the connection. Intermittently, the adds or deletes will either fail completely or only part of the total number of expected adds/deletes will complete. No error is produced in the JBoss black screen.

            If I obtain my connections directly rather than use Minerva's pool of connections, the problem goes away completely. Seems to be a Minerva problem either with DB2 in general or it's driver.

            • 3. Re: Using DB2 in JBoss causing lock problems
              David Jencks Master

              xa or local transactions?

              One common gotcha is that jboss requires you to get your connections after the transaction has begun and close them before it ends. In particular, you can't hold onto connections over method boundaries. Common symptoms include data not getting saved and running out of connections.

              If this isn't it... the jboss pools do prepared statement pooling also. Is it possible that db2 doesn't like its prepared statements reused in different transactions? (unlikely, but weirder things have happened).

              You are using transaction tags so your work is in defined transactions, right?