ObjectWeb Consortium
Search ObjectWeb Mail Archive: 

Advanced Search - Powered by Google

Mail Archive Home | oscar List | July 2005 Index

<--  Date Index  --> <--  Thread Index  -->

Re: [oscar] Uninstall of System Bundles

On Friday 29 July 2005 16:40, Marcel Offermans wrote:
> On Friday 29 July 2005 09:39, Niclas Hedhman wrote:
> > is it correct that bundles that are listed in the activation list of
> > Oscar's constructor can not be uninstalled?
> No. Every bundle you install can be uninstalled again.

Well, "installed" is a bit ambiguous in this case, as it is pre-instantiated 
bundles that are passed to Oscar in Oscar's constructor, and for Oscar to 
"start" when it is done with its stuff.

> > Or could it be that something else is hanging around preventing the
> > system from unload?? For instance, I *am* in the middle of "start-up",
> > and something went wrong which prompt the immediate shutdown.
> That could well be, hard to tell...

This is the sweet Exception.
org.osgi.framework.BundleException: Cannot uninstall the system bundle.
        at org.ungoverned.oscar.SystemBundle.uninstall(SystemBundle.java:238)
        at org.ops4j.silk.boot.internal.BootImpl.dismantle(BootImpl.java:146)

and after checking out the source, here is the relevant Oscar code;

class SystemBundle extends BundleImpl
    public synchronized void uninstall() throws BundleException
        throw new BundleException("Cannot uninstall the system bundle.");

Also found this interesting comment;
// Spec says stop() on SystemBundle should return immediately and
// shutdown framework on another thread.

Which indicates that a stop() is the only thing expected.

> The system bundle is the only bundle that is a bit different from the rest.
> It is automatically installed and you cannot stop or uninstall it. Or
> rather, if you stop it, the framework stops. This behaviour is mandated by
> the OSGi spec, so you can find more details about the system bundle there.

Well, I am embedding Oscar, and part of the embedding is to bridge the OSGi 
world with the rest, so I instantiate two BundleActivators and place them on 
the activationList in Oscar's constructor. Since the Oscar now tells me that 
one of those (at least) is a SystemBundle, I am no longer sure what is 
expected from me.
The objectweb website is currently no reachable from here either, so I can 
for more information (if there is any) :o(


<--  Date Index  --> <--  Thread Index  -->

Reply via email to:

Powered by MHonArc.

Copyright © 1999-2005, ObjectWeb Consortium | contact | webmaster.