You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by ju...@apache.org on 2011/02/11 16:17:19 UTC

svn commit: r1069831 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/TransientRepository.java

Author: jukka
Date: Fri Feb 11 15:17:19 2011
New Revision: 1069831

URL: http://svn.apache.org/viewvc?rev=1069831&view=rev
Log:
JCR-2889: Occasional JCA test failures

Check the repository reference instead of the number of tracked sessions when determining whether the repository needs starting. This is more resilient against weird interactions with the garbage collector.

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

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/TransientRepository.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/TransientRepository.java?rev=1069831&r1=1069830&r2=1069831&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/TransientRepository.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/TransientRepository.java Fri Feb 11 15:17:19 2011
@@ -372,7 +372,7 @@ public class TransientRepository extends
             Credentials credentials, String workspaceName)
             throws RepositoryException {
         // Start the repository if this is the first login
-        if (sessions.isEmpty()) {
+        if (repository == null) {
             startRepository();
         }