> From: Stefano Mazzocchi [mailto:[EMAIL PROTECTED] 
>
> But...
> 
> > Is this related to the statefulness of the component?
> 
> ... as you correctly spot, the thing is way more tricky than 
> it looks at 
> first.
> 
> The way we solved this was to enable a sort of loose-coupling wiring 
> between components. This requires block A to check for the 
> wire validity everytime a service is invoqued and, if not, look it up
again 
> (obviously the framework will provide helping code for this).

Could also be solved by introducing the notion of component
transactions.
Add a read and write lock to each component wire.
Block A could in effect disable hot-swapping of a component while it is
used (i.e. get a read-lock on the wire), while the hot-swap machinery
tries to get a write-lock on the wire. Thus, the component will
never be swapped when used, and thus the wire-check is unneccessary.

/LS

Reply via email to