At the moment I am trying to implement a Connector and I always encounter the same problem:
Every time a client tries to obtain a connection, not only a Connection object, but also a ManagedConnection object is allocated. This ManagedConnection objects always remain and never get removed, but are never reused. This means I easily reach the pool limit and I cannot share ManagedConnection objects among several clients.
After debugging the ManagedConnectionFactory object I found out, that the matchManagedConnection method never gets called. For every connection only the createManagedConnection method is invoked.
How can I trigger the ConnectionManager to call this method and thus enable sharing of ManagedConnections ?
What am I doing wrong or what might be missing in my code ?
Thanks in advance
Is that a spider in your hair? Here, threaten it with this tiny ad: