You either need to do a package refresh after the update of the daemon 
bundle or after a system description is undeployed. Perhaps the latter is 
a better choice since it removed the "old" wire just in time.

As was previously mentioned, it would be better to move away from using 
DynamicImport-Package to avoid these issues. The extender model is a far 
better choice for this.
-- 

BJ Hargrave
Senior Technical Staff Member, IBM
OSGi Fellow and CTO of the OSGi Alliance
[EMAIL PROTECTED]

office: +1 386 848 1781
mobile: +1 386 848 3788




"Pernet, Olivier" <[EMAIL PROTECTED]> 
Sent by: [EMAIL PROTECTED]
2007-06-12 06:12
Please respond to
OSGi Developer Mail List <[email protected]>


To
"OSGi Developer Mail List" <[email protected]>
cc

Subject
RE: [osgi-dev] Semantics of the refresh operation & uninstall andwires






I'm sorry, we have an impedance mismatch here :) 
What I'm saying is that I _want_ to be able to update the daemon bundle at 
that step : let's assume that steps 4. and 5. are several months apart !
This has nothing to do with the fact that the user bundle has been 
uninstalled, it's just that I want updates of the daemon bundle to work at 
all times.
Sorry again for not being clear enough.
Here is the revised list :
1. I install the daemon bundle.
2. I submit a system description to be deployed, that involves installing 
a new bundle from a given URL.
3. The new bundle is installed, and user component classes are loaded from 

it. Because of the DynamicImport-Package directive, a wire is created from 

the daemon bundle to the user bundle.
4. I now ask for the system description to be undeployed, and as a result 
the user bundle is uninstalled.
5. (Months later), I update the daemon bundle. The wire to the uninstalled 
user bundle 
still exists.
6. I ask for the same system description to be deployed. It fails with a 
ClassCastException.
 

From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf Of Felix Meschberger
Sent: 11 June 2007 22:59
To: OSGi Developer Mail List
Subject: Re: [osgi-dev] Semantics of the refresh operation & uninstall 
andwires
Hi Olivier,

The daemon bundle is supposed to have changed - I should have made that 
clearer.

Why ? Just because a bundle has to be removed ? This sounds unreasonable. 

Interestingly, if I don't do anything at step 5, things work fine. But
then I suppose that I'm really loading classes from the old, uninstalled
user bundle.

Probably yes. I cannot actually tell this, as I do not exactly know, how 
the descriptions enter the system. 

Regards
Felix
_______________________________________________
OSGi Developer Mail List
[email protected]
http://www2.osgi.org/mailman/listinfo/osgi-dev

_______________________________________________
OSGi Developer Mail List
[email protected]
http://www2.osgi.org/mailman/listinfo/osgi-dev

Reply via email to