Are you sure the server bundle is providing its service?

-> richard

On 2/13/13 08:36 , Imóveis Nacionais wrote:
Hi
I am trying to play with service events in a client bundle in order to be
notified when other bundles are registered.

So, I created a simple maven osgi bundler just with an activator class.

public class Activator implements BundleActivator, ServiceListener
{

     public void start(BundleContext context) throws Exception
     {
             System.out.println("Client bundle initializing on start
method...");

             context.addServiceListener(this);


     public void stop(BundleContext context) throws Exception
     {
         context.removeServiceListener(this);
     }

     public void serviceChanged(ServiceEvent event)
     {
         System.out.println("serviceChanged called");
     }

Then, in the gogo shell of felix I installed this client bundle and started
it. Then I installed other (server) bundle and started it but the
serviceChanged handler is never called. Why?

Thanks a lot

Alex



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to