In JDBC249 I used a WeakHashMap for the mcfInstances in FBManagedConnectionFactory. This creates a memory leak as a strong reference is maintained to itself. Something similar happens in FBDriver. This needs to be fixed.
Replaced cache key with (clone) of connection properties, replaced WeakHashMap with a ConcurrentHashMap where the value is a SoftReference. Included cleanup routine to remove stale (null-ed) references from the map.
In general this will behave the same, but under memory pressure the cache will actually be cleaned.