Author: cziegeler
Date: Tue Jun 10 04:26:51 2008
New Revision: 666067

URL: http://svn.apache.org/viewvc?rev=666067&view=rev
Log:
SLING-503: Enable the use of the SCR plugin for factory components again
SLING-519: Update to SCR 1.0.1-SNAPSHOT

Removed:
    
incubator/sling/trunk/engine/src/main/resources/OSGI-INF/manual_serviceComponents.xml
    
incubator/sling/trunk/engine/src/main/resources/OSGI-INF/metatype/metatype.xml
    incubator/sling/trunk/engine/src/main/resources/OSGI-INF/scr-plugin/
    
incubator/sling/trunk/jcr/jackrabbit-client/src/main/resources/OSGI-INF/manual_serviceComponents.xml
    
incubator/sling/trunk/jcr/jackrabbit-client/src/main/resources/OSGI-INF/metatype/metatype.xml
    
incubator/sling/trunk/jcr/jackrabbit-server/src/main/resources/OSGI-INF/manual_serviceComponents.xml
    
incubator/sling/trunk/jcr/jackrabbit-server/src/main/resources/OSGI-INF/metatype/metatype.xml
Modified:
    incubator/sling/trunk/engine/pom.xml
    
incubator/sling/trunk/engine/src/main/java/org/apache/sling/engine/impl/log/RequestLoggerService.java
    
incubator/sling/trunk/extensions/adapter/src/main/java/org/apache/sling/adapter/internal/AdapterManagerImpl.java
    incubator/sling/trunk/jcr/jackrabbit-client/pom.xml
    incubator/sling/trunk/jcr/jackrabbit-server/pom.xml
    incubator/sling/trunk/parent/pom.xml

Modified: incubator/sling/trunk/engine/pom.xml
URL: 
http://svn.apache.org/viewvc/incubator/sling/trunk/engine/pom.xml?rev=666067&r1=666066&r2=666067&view=diff
==============================================================================
--- incubator/sling/trunk/engine/pom.xml (original)
+++ incubator/sling/trunk/engine/pom.xml Tue Jun 10 04:26:51 2008
@@ -73,11 +73,6 @@
                         <Embed-Dependency>
                             commons-fileupload
                         </Embed-Dependency>
-                                                
-                        <Service-Component>
-                            OSGI-INF/manual_serviceComponents.xml,
-                            OSGI-INF/serviceComponents.xml
-                        </Service-Component>
                     </instructions>
                 </configuration>
             </plugin>

Modified: 
incubator/sling/trunk/engine/src/main/java/org/apache/sling/engine/impl/log/RequestLoggerService.java
URL: 
http://svn.apache.org/viewvc/incubator/sling/trunk/engine/src/main/java/org/apache/sling/engine/impl/log/RequestLoggerService.java?rev=666067&r1=666066&r2=666067&view=diff
==============================================================================
--- 
incubator/sling/trunk/engine/src/main/java/org/apache/sling/engine/impl/log/RequestLoggerService.java
 (original)
+++ 
incubator/sling/trunk/engine/src/main/java/org/apache/sling/engine/impl/log/RequestLoggerService.java
 Tue Jun 10 04:26:51 2008
@@ -25,14 +25,13 @@
 import org.apache.sling.engine.RequestLog;
 import org.apache.sling.engine.impl.SlingHttpServletResponseImpl;
 import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceRegistration;
 import org.osgi.service.component.ComponentContext;
 
 /**
  * The <code>RequestLoggerService</code> is a factory component which gets
  * configuration to register loggers for the [EMAIL PROTECTED] RequestLogger}.
  *
- * @ scr.component label="%request.log.service.name"
+ * @scr.component label="%request.log.service.name"
  *                description="%request.log.service.description"
  *                
factory="org.apache.sling.engine.impl.log.RequestLoggerService"
  * @scr.property name="service.vendor" value="The Apache Software Foundation"
@@ -124,26 +123,12 @@
 
     // ---------- SCR integration 
----------------------------------------------
 
-    // manual service registration due to component factory bug in Felix SCR 
1.0.0
-    private ServiceRegistration serviceRegistration;
-    
     @SuppressWarnings("unchecked")
     protected void activate(ComponentContext context) {
         this.setup(context.getBundleContext(), context.getProperties());
-        
-        // SLING-502: do manually due to component factory bug in Felix SCR 
1.0.0
-        serviceRegistration = context.getBundleContext().registerService(
-            "org.apache.sling.engine.impl.log.RequestLoggerService", this,
-            context.getProperties());
     }
 
     protected void deactivate(ComponentContext context) {
-        // SLING-502: do manually due to component factory bug in Felix SCR 
1.0.0
-        if (serviceRegistration != null) {
-            serviceRegistration.unregister();
-            serviceRegistration = null;
-        }
-        
         this.shutdown();
     }
 

Modified: 
incubator/sling/trunk/extensions/adapter/src/main/java/org/apache/sling/adapter/internal/AdapterManagerImpl.java
URL: 
http://svn.apache.org/viewvc/incubator/sling/trunk/extensions/adapter/src/main/java/org/apache/sling/adapter/internal/AdapterManagerImpl.java?rev=666067&r1=666066&r2=666067&view=diff
==============================================================================
--- 
incubator/sling/trunk/extensions/adapter/src/main/java/org/apache/sling/adapter/internal/AdapterManagerImpl.java
 (original)
+++ 
incubator/sling/trunk/extensions/adapter/src/main/java/org/apache/sling/adapter/internal/AdapterManagerImpl.java
 Tue Jun 10 04:26:51 2008
@@ -37,8 +37,8 @@
  * The <code>AdapterManagerImpl</code> class implements the
  * [EMAIL PROTECTED] AdapterManager} interface and is registered as a service 
for that
  * interface to be used by any clients.
- * 
- * @scr.component metatype="no"
+ *
+ * @scr.component metatype="no" immediate="true"
  * @scr.property name="service.description" value="Sling Adapter Manager"
  * @scr.property name="service.vendor" value="The Apache Software Foundation"
  * @scr.service
@@ -87,7 +87,7 @@
      * indexed by the fully qualified class names listed in the
      * [EMAIL PROTECTED] AdapterFactory#ADAPTABLE_CLASSES} property of the
      * [EMAIL PROTECTED] AdapterFactory} services.
-     * 
+     *
      * @see AdapterFactoryDescriptorMap
      */
     private Map<String, AdapterFactoryDescriptorMap> factories = new 
HashMap<String, AdapterFactoryDescriptorMap>();
@@ -302,7 +302,7 @@
      * Returns a map of [EMAIL PROTECTED] AdapterFactory} instances for the 
given class to
      * be adapted. The returned map is indexed by the fully qualified name of
      * the target classes (to adapt to) registered.
-     * 
+     *
      * @param clazz The type of the object for which the registered adapter
      *            factories are requested
      * @return The map of adapter factories. If there is no adapter factory
@@ -324,7 +324,7 @@
      * Returns the map of adapter factories index by adapter (target) class 
name
      * for the given adaptable <code>clazz</code>. If no adapter exists for
      * the <code>clazz</code> and empty map is returned.
-     * 
+     *
      * @param clazz The adaptable <code>Class</code> for which to return the
      *            adapter factory map by target class name.
      * @param cache The cache of already defined adapter factory mappings
@@ -352,7 +352,7 @@
      * registration are taken. Next all factories for the implemented 
interfaces
      * and finally all base class factories are copied. Later adapter factory
      * entries do NOT overwrite earlier entries.
-     * 
+     *
      * @param clazz The adaptable <code>Class</code> for which to build the
      *            adapter factory map by target class name.
      * @param cache The cache of already defined adapter factory mappings
@@ -400,7 +400,7 @@
      * <code>cache</code> to the <code>dest</code> map except for those
      * factories whose target class already exists in the <code>dest</code>
      * map.
-     * 
+     *
      * @param dest The map of target class name to adapter factory into which
      *            additional factories are copied. Existing factories are not
      *            replaced.

Modified: incubator/sling/trunk/jcr/jackrabbit-client/pom.xml
URL: 
http://svn.apache.org/viewvc/incubator/sling/trunk/jcr/jackrabbit-client/pom.xml?rev=666067&r1=666066&r2=666067&view=diff
==============================================================================
--- incubator/sling/trunk/jcr/jackrabbit-client/pom.xml (original)
+++ incubator/sling/trunk/jcr/jackrabbit-client/pom.xml Tue Jun 10 04:26:51 2008
@@ -45,12 +45,10 @@
 
     <build>
         <plugins>
-            <!--
             <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-scr-plugin</artifactId>
             </plugin>
-            -->
             <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-bundle-plugin</artifactId>
@@ -71,10 +69,6 @@
                              org.osgi.service.log,
                              *
                         </Import-Package>
-                        
-                        <Service-Component>
-                            OSGI-INF/manual_serviceComponents.xml
-                        </Service-Component>
                     </instructions>
                 </configuration>
             </plugin>

Modified: incubator/sling/trunk/jcr/jackrabbit-server/pom.xml
URL: 
http://svn.apache.org/viewvc/incubator/sling/trunk/jcr/jackrabbit-server/pom.xml?rev=666067&r1=666066&r2=666067&view=diff
==============================================================================
--- incubator/sling/trunk/jcr/jackrabbit-server/pom.xml (original)
+++ incubator/sling/trunk/jcr/jackrabbit-server/pom.xml Tue Jun 10 04:26:51 2008
@@ -44,12 +44,10 @@
 
     <build>
         <plugins>
-            <!--
             <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-scr-plugin</artifactId>
             </plugin>
-            -->
             <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-bundle-plugin</artifactId>
@@ -94,10 +92,6 @@
                             nekohtml,
                             xercesImpl
                         </Embed-Dependency>
-                        
-                        <Service-Component>
-                            OSGI-INF/manual_serviceComponents.xml
-                        </Service-Component>
                     </instructions>
                 </configuration>
             </plugin>

Modified: incubator/sling/trunk/parent/pom.xml
URL: 
http://svn.apache.org/viewvc/incubator/sling/trunk/parent/pom.xml?rev=666067&r1=666066&r2=666067&view=diff
==============================================================================
--- incubator/sling/trunk/parent/pom.xml (original)
+++ incubator/sling/trunk/parent/pom.xml Tue Jun 10 04:26:51 2008
@@ -682,7 +682,7 @@
             <dependency>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>org.apache.felix.scr</artifactId>
-                <version>1.0.0</version>
+                <version>1.0.1-SNAPSHOT</version>
                 <scope>provided</scope>
             </dependency>
         


Reply via email to