OSGi Activator showing wrong status

Problem Statement: OSGi Activator showing wrong status

Solution 1:
Make sure that we are throwing exception, in case of failure in start up.
Make sure that we are not starting new threads and exiting start method, without waiting and verifying its status.


public class MyProjectActivator implements BundleActivator {

public void start(BundleContext context) throws java.lang.Exception
{
// Make sure that all threads are completed.
// Catch Exception 
// Log Exception
// Throw exception.
}

public void stop(BundleContext context) throws java.lang.Exception
{
// Catch Exception 
// Log Exception
// Throw exception.
}

}

-o-

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s