Author: mes
Date: 2011-08-12 13:52:36 -0700 (Fri, 12 Aug 2011)
New Revision: 26547
Modified:
core3/api/trunk/service-api/pom.xml
core3/api/trunk/service-api/src/main/java/org/cytoscape/service/util/internal/CyServiceRegistrarImpl.java
core3/api/trunk/service-api/src/main/resources/META-INF/spring/bundle-context.xml
Log:
changed how BundleContext is injected
Modified: core3/api/trunk/service-api/pom.xml
===================================================================
--- core3/api/trunk/service-api/pom.xml 2011-08-12 20:49:42 UTC (rev 26546)
+++ core3/api/trunk/service-api/pom.xml 2011-08-12 20:52:36 UTC (rev 26547)
@@ -86,12 +86,6 @@
<version>${osgi.api.version}</version>
<scope>provided</scope>
</dependency>
- <dependency>
- <groupId>org.springframework.osgi</groupId>
- <artifactId>spring-osgi-core</artifactId>
- <version>${spring.osgi.version}</version>
- <scope>provided</scope>
- </dependency>
</dependencies>
</project>
Modified:
core3/api/trunk/service-api/src/main/java/org/cytoscape/service/util/internal/CyServiceRegistrarImpl.java
===================================================================
---
core3/api/trunk/service-api/src/main/java/org/cytoscape/service/util/internal/CyServiceRegistrarImpl.java
2011-08-12 20:49:42 UTC (rev 26546)
+++
core3/api/trunk/service-api/src/main/java/org/cytoscape/service/util/internal/CyServiceRegistrarImpl.java
2011-08-12 20:52:36 UTC (rev 26547)
@@ -9,23 +9,19 @@
import org.osgi.framework.ServiceRegistration;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import org.springframework.osgi.context.BundleContextAware;
-public class CyServiceRegistrarImpl implements CyServiceRegistrar,
BundleContextAware {
+public class CyServiceRegistrarImpl implements CyServiceRegistrar {
private static final Logger logger =
LoggerFactory.getLogger(CyServiceRegistrarImpl.class);
- private BundleContext bc;
+ private final BundleContext bc;
private Map<Class,Map<Object,ServiceRegistration>> refs;
- public CyServiceRegistrarImpl() {
+ public CyServiceRegistrarImpl(BundleContext bc) {
+ this.bc = bc;
refs = new HashMap<Class,Map<Object,ServiceRegistration>>();
}
- public void setBundleContext(BundleContext bc) {
- this.bc = bc;
- }
-
public void registerAllServices(Object o, Dictionary props) {
for ( Class c : o.getClass().getInterfaces() )
registerService(o,c,props);
Modified:
core3/api/trunk/service-api/src/main/resources/META-INF/spring/bundle-context.xml
===================================================================
---
core3/api/trunk/service-api/src/main/resources/META-INF/spring/bundle-context.xml
2011-08-12 20:49:42 UTC (rev 26546)
+++
core3/api/trunk/service-api/src/main/resources/META-INF/spring/bundle-context.xml
2011-08-12 20:52:36 UTC (rev 26547)
@@ -25,6 +25,7 @@
<context:annotation-config/>
<bean id="cyServiceRegistrar"
class="org.cytoscape.service.util.internal.CyServiceRegistrarImpl">
+ <constructor-arg ref="bundleContext" />
</bean>
</beans>
--
You received this message because you are subscribed to the Google Groups
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/cytoscape-cvs?hl=en.