incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r887137 - /sling/trunk/bundles/jcr/jackrabbit-server/src/main/java/org/apache/sling/jcr/jackrabbit/server/impl/SlingServerRepository.java
Date Fri, 04 Dec 2009 10:00:57 GMT
Author: fmeschbe
Date: Fri Dec  4 10:00:56 2009
New Revision: 887137

URL: http://svn.apache.org/viewvc?rev=887137&view=rev
Log:
SLING-480 Convert embedded repository into a plain component and have the DS implementation
create instances according to factory configuration as defined by the DS spec.

Modified:
    sling/trunk/bundles/jcr/jackrabbit-server/src/main/java/org/apache/sling/jcr/jackrabbit/server/impl/SlingServerRepository.java

Modified: sling/trunk/bundles/jcr/jackrabbit-server/src/main/java/org/apache/sling/jcr/jackrabbit/server/impl/SlingServerRepository.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/jackrabbit-server/src/main/java/org/apache/sling/jcr/jackrabbit/server/impl/SlingServerRepository.java?rev=887137&r1=887136&r2=887137&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/jackrabbit-server/src/main/java/org/apache/sling/jcr/jackrabbit/server/impl/SlingServerRepository.java
(original)
+++ sling/trunk/bundles/jcr/jackrabbit-server/src/main/java/org/apache/sling/jcr/jackrabbit/server/impl/SlingServerRepository.java
Fri Dec  4 10:00:56 2009
@@ -40,8 +40,8 @@
  * The <code>SlingServerRepository</code> TODO
  *
  * @scr.component label="%repository.name" description="%repository.description"
- *          factory="org.apache.sling.jcr.jackrabbit.server.SlingServerRepositoryFactory"
  *          name="org.apache.sling.jcr.jackrabbit.server.SlingServerRepository"
+ *          configurationFactory="true" configuration-policy="require"
  *
  * @scr.property name="service.vendor" value="The Apache Software Foundation"
  * @scr.property name="service.description"
@@ -81,14 +81,14 @@
     public static final String REPOSITORY_REGISTRATION_NAME = "name";
 
     //---------- Repository Management ----------------------------------------
-    
+
     @Override
     protected Repository acquireRepository() {
         Repository repository = super.acquireRepository();
         if (repository != null) {
             return repository;
         }
-        
+
         @SuppressWarnings("unchecked")
         Dictionary<String, Object> environment = this.getComponentContext().getProperties();
         String configURLObj = (String) environment.get(REPOSITORY_CONFIG_URL);
@@ -100,7 +100,7 @@
             String derbyLog = home + "/derby.log";
             System.setProperty("derby.stream.error.file", derbyLog);
         }
-        
+
         InputStream ins = null;
         try {
 
@@ -117,15 +117,15 @@
 
             RepositoryConfig crc = RepositoryConfig.create(ins, home);
             return RepositoryImpl.create(crc);
-            
+
         } catch (IOException ioe) {
-            
+
             log(LogService.LOG_ERROR,
                 "acquireRepository: IO problem starting repository from "
                     + configURLObj + " in " + home, ioe);
-            
+
         } catch (RepositoryException re) {
-            
+
             log(LogService.LOG_ERROR,
                 "acquireRepository: Repository problem starting repository from "
                     + configURLObj + " in " + home, re);
@@ -138,17 +138,17 @@
                 }
             }
         }
-        
+
         // got no repository ....
         return null;
     }
-    
+
     @Override
     protected void disposeRepository(Repository repository) {
         super.disposeRepository(repository);
 
         if (repository instanceof RepositoryImpl) {
-            
+
             try {
                 ((RepositoryImpl) repository).shutdown();
             } catch (Throwable t) {
@@ -156,13 +156,13 @@
                     "deactivate: Unexpected problem shutting down repository",
                     t);
             }
-            
+
         } else {
             log(LogService.LOG_INFO,
                 "Repository is not a RepositoryImpl, nothing to do");
         }
     }
-    
+
     //---------- Helper -------------------------------------------------------
 
     public static void copyFile(Bundle bundle, String entryPath, File destFile) throws FileNotFoundException,
IOException {



Mime
View raw message