jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r894150 - /jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/Jcr2spiRepositoryFactory.java
Date Mon, 28 Dec 2009 11:30:44 GMT
Author: mduerig
Date: Mon Dec 28 11:30:43 2009
New Revision: 894150

URL: http://svn.apache.org/viewvc?rev=894150&view=rev
Log:
JCR-2447: RepositoryConfig created by Jcr2spiRepositoryFactory should always return same RepositoryService
instance

Modified:
    jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/Jcr2spiRepositoryFactory.java

Modified: jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/Jcr2spiRepositoryFactory.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/Jcr2spiRepositoryFactory.java?rev=894150&r1=894149&r2=894150&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/Jcr2spiRepositoryFactory.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/Jcr2spiRepositoryFactory.java
Mon Dec 28 11:30:43 2009
@@ -227,6 +227,7 @@
         private final int itemCacheSize;
         private final int pollTimeOut;
         private final Map<?, ?> parameters;
+        private RepositoryService repositoryService;
 
         public RepositoryConfigImpl(RepositoryServiceFactory serviceFactory, Map<?, ?>
parameters)
                 throws RepositoryException {
@@ -252,7 +253,10 @@
         }
 
         public RepositoryService getRepositoryService() throws RepositoryException {
-            return serviceFactory.createRepositoryService(parameters);
+            if (repositoryService == null) {
+                repositoryService = serviceFactory.createRepositoryService(parameters);
+            }
+            return repositoryService;
         }
 
         // -----------------------------------------------------< private >---



Mime
View raw message