Q:

Dynamically load Webservice bundle in Eclipse RCP application

Here's what I want to do: I have a Server and a client application that communicate via webservices (SOAP).
The client is an Eclipse RCP application that uses the DOSIG bundle from Apache CXF. I have used declarative services and a BundleActivator as described in this tutorial: http://cxf.apache.org/dosgi-ds-demo-page.html
I got the client to connect with the server by adding an autostart entry for the Apache CXF bundle. The problem is that this slows down the startup significantly  because Apache CXF takes a while to set up the service and everything. Only when Apache CXF bundle has been started completely my UI shows up.
I would like to have the UI show up before the Apache CXF bundle has finished starting. I won't need the webservices immediately and have to handle missing webservices anyway. So I would like my UI to show up and then activate functionality as webservices become available. 
So my questions are:

Does this approach make any sense?
How can I implement this? I suppose I have to start the cxf bundle from my running application?

A:

You can start a plugin (bundle) using something like this:
final Bundle bundle = Platform.getBundle(id);
if (bundle != null)
 {
   if ((bundle.getState() & Bundle.ACTIVE) == 0)
    {
      try
       {
         bundle.start(Bundle.START_TRANSIENT);
       }
      catch (final BundleException ex)
       {
         // Handle error
       }
    }
 }

