cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oisin Hurley <ohur...@iona.com>
Subject Re: Problems embedding CXF in Eclipse
Date Thu, 22 Feb 2007 11:21:01 GMT
> I have no idea how to use the solution though, as I have no idea  
> where to
> get a Bundle to pass into the constructor. This make sense to  
> anyone else?

When you construct an OSGi bundle and install it into an OSGi  
"container",
you should provide an activation class that is used to adapt your  
code to the
lifecycle facilities provided by OSGi. You get the Bundle instance  
from the BundleContext that is passed into the start() call:

public CeltixBundleActivator implements BundleActivator {
    private Bundle myBundle;

    public void start(BundleContext bc) throws Exception {
        myBundle = bc.getBundle();
    }

    public void stop(BundleContext bc) throws Exception {
   ....
    }

    public Bundle getBundle() {
       return myBundle;
    }
}

BTW, Dennis, I'm a member of the OSGi Enterprise Expert Group, and
really interested in distributed OSGi in general and CXF+OSGi in
particular.  Would you be interested in sharing more about your work?
We might be able to help out!

  cheers
   --oh

  
    

Mime
View raw message