You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by gn...@apache.org on 2007/12/20 09:27:10 UTC

svn commit: r605832 - /servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/impl/Deployer.java

Author: gnodet
Date: Thu Dec 20 00:27:08 2007
New Revision: 605832

URL: http://svn.apache.org/viewvc?rev=605832&view=rev
Log:
Use the installed bundle to register the service

Modified:
    servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/impl/Deployer.java

Modified: servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/impl/Deployer.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/impl/Deployer.java?rev=605832&r1=605831&r2=605832&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/impl/Deployer.java (original)
+++ servicemix/smx4/nmr/trunk/jbi/deployer/src/main/java/org/apache/servicemix/jbi/deployer/impl/Deployer.java Thu Dec 20 00:27:08 2007
@@ -143,7 +143,7 @@
         props.put(TYPE, componentDesc.getType());
         // register the component in the OSGi registry
         LOGGER.debug("Registering JBI component");
-        context.registerService(Component.class.getName(), component, props);
+        bundle.getBundleContext().registerService(Component.class.getName(), component, props);
     }
 
     protected void deployServiceAssembly(ServiceAssemblyDesc serviceAssembyDesc, Bundle bundle) throws Exception {
@@ -179,7 +179,7 @@
         props.put(NAME, serviceAssembyDesc.getIdentification().getName());
         // register the service assembly in the OSGi registry
         LOGGER.debug("Registering JBI service assembly");
-        context.registerService(ServiceAssembly.class.getName(), sa, props);
+        bundle.getBundleContext().registerService(ServiceAssembly.class.getName(), sa, props);
     }
 
     protected void installSharedLibrary(SharedLibraryDesc sharedLibraryDesc, Bundle bundle) {
@@ -190,7 +190,7 @@
         // populate props from the library meta-data
         props.put(NAME, sharedLibraryDesc.getIdentification().getName());
         LOGGER.debug("Registering JBI Shared Library");
-        context.registerService(SharedLibrary.class.getName(), sl, props);
+        bundle.getBundleContext().registerService(SharedLibrary.class.getName(), sl, props);
     }
 
     protected Component getComponent(String name) {