3 Replies Latest reply on Mar 28, 2002 10:28 AM by Jeff Do

    possible connection pooling problem? Help wanted!!!

    chen fang Newbie

      I am using JBoss-2.4.4 with postgresql 7.1

      I have seen the following problem with my first simple JBoss program.

      I have a stateless session bean and an entity bean.

      In my test client program, I run the following methods:

      In methodA, I find the seesion bean, calls one method, which in turns creates a entity bean and insert a row in postgresql.

      In methodB, I uses the same session bean above, calls another method for the same entity bean, updates some values and store it back.

      When I am running my client program, it hangs there. I did some println, it was hanging in ejbStore() of my entity bean when methodB() get called because it gets into the method but hangs at
      ps.executeUpdate(). methodA() finishes since I can see the row I created through another connection to postgresql. So in other words, it was able to finish ps.executeUpdate() for methodA(), but not for methodB().

      What's weird is that if I run the above two methods separately in different client test programs with shutting down JBoss and restart it between, methodB()
      returns successfully with the correct value in table updated.

      Is this possible to be a connection pooling related?

      When the client hangs, in JBoss console, it gives a time out exception. And when I kills JBoss, the client console
      gives me the following exception:

      Exception in thread "main" java.lang.reflect.UndeclaredThrowableException: javax.transaction.RollbackException: Unable to commit, tx=XidImpl [FormatId=257, GlobalId=localhost.localdomain//1, BranchQual=] status=STATUS_ROLLEDBACK