Sunday, December 14, 2003, 2:28:14 PM, Stephen McConnell wrote:

> Daniel Dekany wrote:
>
>>Saturday, December 13, 2003, 6:34:55 AM, Stephen McConnell wrote:
>>  
>>
>>>Normal VM termination triggers a shutdown hook.  The shutdown hook 
>>>triggers shutdown of the kernel. Kernel shutdown triggers 
>>>decommissioning of the root application block.  Block decomissioning 
>>>triggers orderly decommissioning of the appliances contained within it.  
>>>Appliance decommissioning trigers disposal of the associated lifestyle 
>>>handler.  The lifestyle handler maintains a soft references queue and 
>>>from this can locate and non-finalized component instances and invoke 
>>>component decommissioning.
>>>    
>>>
>>
>>Are you sure? A soft reference to object O my cleared (=> get() returns
>>null, so you can access O anymore) before O.finlaize() is invoked. So it
>>can happen that you can't access O with soft reference, but it is not
>>finalized yet either.
>>
>
> The soft reference is to the proxy so if the reference returns null we
> know that the proxy has been finalized which means that the
> corresponding component has been decommissioned.
[snip]

Why? Is it a soft reference cleared exactly when the referenced object
is finalized? Is this two act united to form an atomic operation? I
think they are not, so it is possible that the soft ref. cleared earlier
than finalization is called (but please point out if the JVM spec.
states something that prevents this to happen), so it is till not
ensured that finalize() will be called before the VM terminates.

-- 
Best regards,
 Daniel Dekany



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to