5 Replies Latest reply on Aug 29, 2002 7:45 PM by davidjencks

    Castor JDO, MySQL and connection pool

    dagblakstad

      Hi!

      I am having a problem with connection pooling with MySQL, and Castor JDO in JBoss 3.1.0 alpha.
      (I am using the alpha version to get the axis service to work)

      The ejbs and web application runs fine for some time, but suddenly starts reporting errors, like below:
      Error during query: com.tec.mpki.persistence.PersistenceException: org.exolab.castor.jdo.PersistenceException: Nested error: org.jboss.util.NestedSQLException: No ManagedConnections Available!; - nested throwable: (javax.resource.ResourceException: No ManagedConnections Available!)

      It seems like the connections are never released, even if I call db.close (Castor Database that is) after every operation.


      Best regards Dag Blakstad

        • 1. Re: Castor JDO, MySQL and connection pool
          davidjencks

          At least one other person reported this recently. I suspect that Castor and/or its plugin is not closing connections to release them back into the pool. You might try setting the pool max size to 1 and turning logging up everywhere and trying to use Castor twice.

          • 2. Re: Castor JDO, MySQL and connection pool
            dagblakstad

            Seems like you are right about your suspicions: It failed on the second request.

            • 3. Re: Castor JDO, MySQL and connection pool
              dagblakstad

              When I looked after, Castor JDO plugin was not using pooled connections. I added DatabasePooling=true to the configuration parameters. This revealed that there might be a bug in the JDO plugin, because it tries to release connections to the pool, that the pool apparently does not know about.

              java.rmi.ServerException: disconnect(ManagedConnection mc: null, Object c: org.jboss.resource.adapter.jdbc.local.LocalConnection@9c2931) called with unknown managed connection; nested exception is:
              java.lang.IllegalArgumentException: disconnect(ManagedConnection mc: null, Object c: org.jboss.resource.adapter.jdbc.local.LocalConnection@9c2931) called with unknown managed connection

              Anyone who has a clue about this one?

              Dag

              • 4. Re: Castor JDO, MySQL and connection pool
                benw

                Have you guys try posting your problem on the Castor mailing list? There are a lot of activites on that list and someone should be able to give you some insights.

                Ben

                • 5. Re: Castor JDO, MySQL and connection pool
                  davidjencks

                  If Castor is closing its connections at appropriate times you should not be running into that code. Does the ejb that uses castor implement equals and hashcode? If so you should use a more recent jboss version (from cvs), it is a JBoss bug I fixed recently.