jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Guggisberg <stefan.guggisb...@gmail.com>
Subject Re: ConnectionRecoveryManager collecting all PreparedStatements
Date Wed, 08 Apr 2009 09:30:40 GMT
On Tue, Apr 7, 2009 at 10:29 AM, Christian Schröder <news@l7010.de> wrote:
> Hello,
> i'am wondering if it is intended that ConnectionRecoveryManager collects
> all PreparedStatements ever done and never removes them at all.
>
> I suspect this could lead to memory leak problems in the long run.
>
> It seams the preparedStatements Map inside
> org.apache.jackrabbit.core.persistence.bundle.util.ConnectionRecoveryManager
> is used as a cache. If so it really should have an eviction strategy and
> a maximum size. Otherwise it should leak sometime in my understanding.

the hashmap keeping track of the PreparedStatement instances is cleared
on reconnect. all previously created PreparedStatement instances are now
subject to be gc'ed. IMO a reasonable PreparedStatement implementation
will free all bond resources once an instance is finalized. at least so far
we haven't experienced any related issues. please create a jira issue if you do
experience reasource leakage issues with a specific jdbc driver.

cheers
stefan

>
> Just stumbled over it because of
> https://sourceforge.net/tracker/?func=detail&aid=2728324&group_id=111957&atid=660861
> where this behaviour means serious trouble together with the filed bug
> in ha-jdbc :)
>
> Maybe i have overlooked something, thats why i didn't file a bug report.
>
> regards
> Christian
>
>
>

Mime
View raw message