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

Creating OSGi Bundles

http://blog.springsource.com/2008/02/18/creating-osgi-bundles/

Nice faq on bundles: http://www.springsource.com/repository/app/faq

Bundles repository: http://www.osgi.org/Repository/HomePage. This is giving link to spring source repository.

Spring Source bundle repository: http://www.springsource.com/repository/app/

Hibernate is part of JBoss OSGi.
http://www.jboss.org/community/wiki/JBossOSGiProjectInfrastructure

Spring Hibernate Issues
http://hwellmann.blogspot.com/2008/11/hibernate-and-osgi-elaborate-solution.html

There is no OSGi key word on entire Hibernate site.

Nice tutorial on how to build OSGi bundles
https://www.wso2.org/node/4718/print

BND Tool. This converts given jar file to osgi bundle. It is not putting version information in it. We may need to use properties file to achieve it.
http://www.aqute.biz/Code/Bnd

Best tutorial on wraping Hibernate into Bundle
http://www.aqute.biz/Code/BndHibernate

-o-

How to do bundling?

We have two tools. One is BND and other is Bundler from spring source

http://www.aqute.biz/Code/Bnd – Now struggling with this to import version information.

http://static.springsource.org/s2-bundlor/1.0.x/user-guide/htmlsingle/user-guide.html – Need to try

-o-