4 Replies Latest reply on Mar 7, 2003 10:51 PM by davidjencks

    Error in use of ManagedConnectionPool

    hounce

      Hi,

      I tried to use a connector initially written for WebLogic 6.1 (where it works), therefore I created a myconnector-service.xml and deployed both the rar and the xml.

      When my ConnectionFactory calls allocateConnection on the ConnectionManager it gets the following exception:

      11:05:54,066 ERROR [STDERR] Error in use of ManagedConnectionPool: matchManagedConnection failed with subject: null and ConnectionRequestInfo: MyFileConnectionRequestInfo@ed4c475d
      11:05:54,071 ERROR [STDERR] at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPo
      ol.java:98)
      11:05:54,072 ERROR [STDERR] at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool.getConnection(JBossManagedConnection
      Pool.java:509)
      11:05:54,072 ERROR [STDERR] at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java
      :467)
      11:05:54,073 ERROR [STDERR] at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:5
      32)
      11:05:54,074 ERROR [STDERR] at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseCo
      nnectionManager2.java:812)
      11:05:54,075 ERROR [STDERR] at MyFileConnectionFactory.getConnection(Unknown Source)

      To be true, I don't get this exception the first time I use the connector, the first time everything seems to be OK.

      Did I missed something ? Any ideas where the problem is ?

      Thany in advance.

        • 1. Re: Error in use of ManagedConnectionPool
          begram

          I got the same behaviour with my connector in JBOSS 3.0.6 with Tomcat.
          The error occur when the matchManagedConnections in the ManagedConnectionFactory return null.
          If I understand the documentation right, the ManagedConnectionFactory implementation shall decide if there is a matching connection, NOT the application server. Is this a bug in JBOSS?

          • 2. Re: Error in use of ManagedConnectionPool
            begram

            I got the same behaviour with my connector in JBOSS 3.0.6 with Tomcat.
            The error occur when the matchManagedConnections in the ManagedConnectionFactory return null.
            If I understand the documentation right, the ManagedConnectionFactory implementation shall decide if there is a matching connection, NOT the application server. Is this a bug in JBOSS?

            • 3. Re: Error in use of ManagedConnectionPool
              begram

              I got the same behaviour with my connector in JBOSS 3.0.6 with Tomcat.
              The error occur when the matchManagedConnections in the ManagedConnectionFactory return null.
              If I understand the documentation right, the ManagedConnectionFactory implementation shall decide if there is a matching connection, NOT the application server. Is this a bug in JBOSS?

              • 4. Re: Error in use of ManagedConnectionPool
                davidjencks

                The current pool implementation assumes that it can predict what will and won't match. It can use the Subject alone, ConnectionRequestInfo alone, both, or none. You set what it will use with the criteria attribute of the pool

                IMO this gives us the best concurrency in the connection manager, and so far it hasn't been a real problem. I need to see a reasonable example of an adapter that distinguishes connections for matching on some basis other that the cri and subject before I will consider writing an additional pool implementation for this case. Remember that the cri class is required to implement hashcode and equals based on all the properties the MCF can use for matching.