Hi everybody!

   Greetings!

  I have a doubt with service registration in OSGi R4. Can two diff bundles register two similar services, meaning with the same classname and properties, but with a different service impl object.

 For e.g.,
Class MyClass implements BundleActivator
{
  pulic void start()
  {
     // construct a map with a property holding this classname.
     sReg = bundlecontext.registerService(this.getClass ().getName(), this, map);
  }

  public void stop()
  {
    sReg.unregister();
  }
}

   Now, can I have the same class as part of two of my bundles, install and start them sucessfully. Will two services be registered in the framework under the same classname?
Please note that the package in which this class resides is the same in both the bundles.

--
Cheers
Joe
----------------
Visit my blog at http://djlolly.blogspot.com
* Believing in yourself is an endless destination;
  But, believing your have failed is the end of the journey.
* A pound a fret cant pay an ounce a debt.


--
Cheers
Joe
----------------
Visit my blog at http://djlolly.blogspot.com
* Believing in yourself is an endless destination;
  But, believing your have failed is the end of the journey.
* A pound a fret cant pay an ounce a debt.
_______________________________________________
osgi-dev mailing list
osgi-dev@bundles.osgi.org
http://bundles.osgi.org/mailman/listinfo/osgi-dev

Reply via email to