jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marvin Lau <ml4li...@gmail.com>
Subject JCAConnectionRequestInfo leak in Jackrabbit JCA?
Date Thu, 28 Aug 2008 00:34:30 GMT
I am running Jackrabbit JCA 1.3.1 on JBoss 4.3, with an Oracle database.
I found that every time a new connection is made, an instance of
JCAConnectionRequestInfo is created and is never deallocated.  The
instance and the objects that it references (e.g. a SimpleCredential)
stay in memory until JBoss is shutdown.

I also ran tests with Jackrabbit JCA 1.4 (using jackrabbit-jca-1.4.rar
that I downloaded from a mirror site) and found that it has the
same problem.

The following is my jcr-ds.xml

<?xml version="1.0" encoding="UTF-8"?>
        <config-property name="homeDir" 
        <config-property name="configFile" 
        <config-property name="bindSessionToTransaction" 

I ran a test inside JBoss similar to the one below:

    public void testLoginLogout() throws Exception {
        InitialContext ctx = new InitialContext();
        Repository repository = (Repository) ctx.lookup("java:jcr/local");
        for (int i = 0; i < 1000; i++) {
            Session session_ = repository.login(new SimpleCredentials("foo", 

Each login caused a new connection to be created; each connection had its own
instance of JCAConnectionRequestInfo; each instance of
JCAConnectionRequestInfo referenced its own instance of SimpleCredential.
After all the connections were timed out and destroyed, all instances of
JCAConnectionRequestInfo and SimpleCredential remained in memory.

I also tried logging in without a credential (by calling Repository.login()
without any input parameters).  In this case only one connection was created,
with an associated JCAConnectionRequestInfo instance, and the same connection
was reused for all 1000 logins.  When the connection was timed out and
destroyed, the JCAConnectionRequestInfo remained in memory until JBoss was

Has anyone seen this before?  Is there any configuration parameter that can
fix this?


View raw message