Service and Bundle explanation required
Hi All,
I read the below in one of the forum.
What is a Service?
An OSGi service is a java object instance, registered into an OSGi framework with a set of properties. Any java object can be registered as a service, but typically it implements a well-known interface.
The client of a service is always an OSGi bundle, i.e. a piece of java code possible to start via the BundleActivator interface.
Each bundle may register zero or more services. Each bundle may also use zero or more services. There exists no limit on the number of services, more than the ones given by memory limits or java security permissions.
My doubts are as below :
- "The client of a service is always an OSGi bundle, i.e. a piece of java code possible to start via the BundleActivator interface.Each bundle may register zero or more services".
What exactly does the above statement imply.
a]If I create a bundle, a service for it is automatically created?
b] If a start the bundle, the service is invoked.
Any detailed explanation on this will be helpful.