jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Dettman (JIRA)" <j...@apache.org>
Subject [jira] Updated: (JCR-2106) SystemSessions created for GarbageCollector are not logged out of
Date Mon, 11 May 2009 17:59:45 GMT

     [ https://issues.apache.org/jira/browse/JCR-2106?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Peter Dettman updated JCR-2106:
-------------------------------

    Attachment: JCR-2106-2nd.patch

Patch against latest build (on top of previous patch). Stores the session listener in a field
of GarbageCollector so that it is not collected.

Also moves the closing of the system sessions from loggedOut() to loggingOut(); it seems more
appropriate that the lifetime of those system sessions be bounded by the parent session.


> SystemSessions created for GarbageCollector are not logged out of
> -----------------------------------------------------------------
>
>                 Key: JCR-2106
>                 URL: https://issues.apache.org/jira/browse/JCR-2106
>             Project: Jackrabbit Content Repository
>          Issue Type: Improvement
>          Components: jackrabbit-core
>    Affects Versions: 1.5.5
>            Reporter: Peter Dettman
>            Assignee: Thomas Mueller
>            Priority: Minor
>         Attachments: JCR-2106-2nd.patch, JCR-2106.patch
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> I have a simple garbage collection task that runs periodically. After upgrading to 1.5.5
it started logging a warning shortly after each run:
> 2009-05-09 03:44:45,480 WARN [org.apache.jackrabbit.core.SessionImpl] - <Unclosed
session detected. The session was opened here: >
> java.lang.Exception: Stack Trace
> 	at org.apache.jackrabbit.core.SessionImpl.<init>(SessionImpl.java:239)
> 	at org.apache.jackrabbit.core.SystemSession.<init>(SystemSession.java:76)
> 	at org.apache.jackrabbit.core.SystemSession.create(SystemSession.java:64)
> 	at org.apache.jackrabbit.core.SessionImpl.createDataStoreGarbageCollector(SessionImpl.java:649)
> So it's not my session, but an internally created SystemSession.
> Code I'm using:
>             getTemplate().execute(new JcrCallback()
>             {
>                 public Object doInJcr(Session session)
>                     throws IOException, RepositoryException {
>                     SessionImpl sessionImpl = (SessionImpl)session;
>                     GarbageCollector gc = sessionImpl.createDataStoreGarbageCollector();
>                     gc.scan();
>                     gc.stopScan();
>                     gc.deleteUnused();
>                     return null;
>                 }
>             }, true);

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message