You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by cz...@apache.org on 2016/07/14 07:07:49 UTC
svn commit: r1752592 - in /felix/sandbox/scr-r7: pom.xml
src/main/java/org/apache/felix/scr/impl/manager/RegionConfigurationSupport.java
Author: cziegeler
Date: Thu Jul 14 07:07:49 2016
New Revision: 1752592
URL: http://svn.apache.org/viewvc?rev=1752592&view=rev
Log:
Use R7 config admin
Modified:
felix/sandbox/scr-r7/pom.xml
felix/sandbox/scr-r7/src/main/java/org/apache/felix/scr/impl/manager/RegionConfigurationSupport.java
Modified: felix/sandbox/scr-r7/pom.xml
URL: http://svn.apache.org/viewvc/felix/sandbox/scr-r7/pom.xml?rev=1752592&r1=1752591&r2=1752592&view=diff
==============================================================================
--- felix/sandbox/scr-r7/pom.xml (original)
+++ felix/sandbox/scr-r7/pom.xml Thu Jul 14 07:07:49 2016
@@ -70,7 +70,7 @@
<bundle.file.name>
${bundle.build.name}/${project.build.finalName}.jar
</bundle.file.name>
- <felix.ca.version>1.8.10</felix.ca.version>
+ <felix.ca.version>1.8.11-R7-SNAPSHOT</felix.ca.version>
</properties>
@@ -89,7 +89,33 @@
</dependency>
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>osgi.cmpn</artifactId>
+ <artifactId>org.osgi.service.component</artifactId>
+ <version>1.3.0</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.configadmin</artifactId>
+ <version>1.8.11-R7-SNAPSHOT</version>
+ <scope>provided</scope>
+ </dependency>
+<!--
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.service.cm</artifactId>
+ <version>1.5.0</version>
+ <scope>provided</scope>
+ </dependency>
+ -->
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.namespace.extender</artifactId>
+ <version>1.0.1</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>osgi.promise</artifactId>
<version>6.0.0</version>
<scope>provided</scope>
</dependency>
@@ -185,12 +211,6 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.apache.felix.configadmin</artifactId>
- <version>1.8.0</version>
- <scope>test</scope>
- </dependency>
- <dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-atinject_1.0_spec</artifactId>
<version>1.0</version>
@@ -389,14 +409,6 @@
</dependency>
</dependencies>
</profile>
- <profile>
- <!-- use to test with R4 ca, without change count, targetetPids, location changed event -->
- <!-- remember you need to specify all profiles using this, e.g. -PcaR4,felix -->
- <id>caR4</id>
- <properties>
- <felix.ca.version>1.0.10</felix.ca.version>
- </properties>
- </profile>
</profiles>
</project>
Modified: felix/sandbox/scr-r7/src/main/java/org/apache/felix/scr/impl/manager/RegionConfigurationSupport.java
URL: http://svn.apache.org/viewvc/felix/sandbox/scr-r7/src/main/java/org/apache/felix/scr/impl/manager/RegionConfigurationSupport.java?rev=1752592&r1=1752591&r2=1752592&view=diff
==============================================================================
--- felix/sandbox/scr-r7/src/main/java/org/apache/felix/scr/impl/manager/RegionConfigurationSupport.java (original)
+++ felix/sandbox/scr-r7/src/main/java/org/apache/felix/scr/impl/manager/RegionConfigurationSupport.java Thu Jul 14 07:07:49 2016
@@ -58,7 +58,7 @@ public abstract class RegionConfiguratio
private ServiceRegistration<ConfigurationListener> m_registration;
/**
- *
+ *
* @param bundleContext of the ConfigurationAdmin we are tracking
* @param registry
*/
@@ -142,8 +142,9 @@ public abstract class RegionConfiguratio
if ( checkBundleLocation( config, bundleContext.getBundle() ) )
{
long changeCount = config.getChangeCount();
+ // TODO - service reference
created |= holder.configurationUpdated( new TargetedPID( config.getPid() ),
- new TargetedPID( config.getFactoryPid() ), config.getProperties(), changeCount );
+ new TargetedPID( config.getFactoryPid() ), config.getModifiedProperties(null), changeCount );
}
}
if ( !created )
@@ -163,8 +164,9 @@ public abstract class RegionConfiguratio
if ( singleton != null && checkBundleLocation( singleton, bundleContext.getBundle() ) )
{
long changeCount = singleton.getChangeCount();
+ // TODO service reference
holder.configurationUpdated( new TargetedPID( singleton.getPid() ), null,
- singleton.getProperties(), changeCount );
+ singleton.getModifiedProperties(null), changeCount );
}
else
{
@@ -446,7 +448,8 @@ public abstract class RegionConfiguratio
if ( configs != null && configs.length > 0 )
{
Configuration config = configs[0];
- return new ConfigurationInfo( config.getProperties(), config.getBundleLocation(),
+ // TODO - service reference
+ return new ConfigurationInfo( config.getModifiedProperties(null), config.getBundleLocation(),
config.getChangeCount() );
}
}