jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r769319 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/SessionImpl.java
Date Tue, 28 Apr 2009 10:14:53 GMT
Author: thomasm
Date: Tue Apr 28 10:14:52 2009
New Revision: 769319

URL: http://svn.apache.org/viewvc?rev=769319&view=rev
Log:
JCR-2084 DataStore: garbage collection fails if a workspace is not initialized

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/SessionImpl.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/SessionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/SessionImpl.java?rev=769319&r1=769318&r2=769319&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/SessionImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/SessionImpl.java
Tue Apr 28 10:14:52 2009
@@ -685,11 +685,13 @@
             String wspName = wspNames[i];
             WorkspaceInfo wspInfo = rep.getWorkspaceInfo(wspName);
             // this will initialize the workspace if required
-            wspInfo.getSystemSession();
             SessionImpl session = SystemSession.create(rep, wspInfo.getConfig());
             // mark this session as 'active' so the workspace does not get disposed
             // by the workspace-janitor until the garbage collector is done
             rep.onSessionCreated(session);
+            // the workspace could be disposed again, so re-initialize if required
+            // afterwards it will not be disposed because a session is registered
+            wspInfo.initialize();
             sessions[i] = session;
             pm = wspInfo.getPersistenceManager();
             pmList.add(pm);



Mime
View raw message