I disagree that a shutdownhook would be the right place to put that  
code - validation at nide startup is the right place to put it.

If a shutdown hook were the only way application exits from the  
cluster were handled, then immediate termination - e.g. kill -9, power  
or network failure would mean that your shutdown hook would fail to  
execute (or maybe it does but in a network failure scenario it can not  
have a cluster effect since by definition the node is no longer  
connected).





On Aug 28, 2007, at 12:28 PM, "Prasad Bopardikar" <[EMAIL PROTECTED]>  
wrote:

> I have a TC-shared collection object (say a registry) where every  
> clustered app (I mean the ones that are sharing this registry)  
> registers & unregisters itself. I can have my app gracefully  
> shutdown where it will unregister itself but in case of an abrupt  
> shutdown, I thought it would have been cool to have a shutdown hook  
> that would do the unregistration.
>
> I have had to write a mechanism where at the startup of an app,  
> while it registers itself, it will validate other registered nodes &  
> cleanup the registry. This could have been avoided if my shutdown  
> hook worked.
>
> Thanks
> Prasad
>
>
>>>> "Steven Harris" <[EMAIL PROTECTED]> 8/28/2007 1:58 PM >>>
> In order for Terracotta to make sure that all actions taken in the
> process before exiting are fully sent out  it has it's own shutdown  
> hook
> for flushing. I think we might be able to make sure our shutdown hook
> runs last and allow people to do things in their own shutdown
> hook.
>
> That said, I'm curious why you need a shutdown hook in a terracotta
> world?
>
> Cheers,
> Steve
>
> On Aug 28, 2007, at 11:52 AM, Prasad Bopardikar wrote:
>
>> Why does Terracotta not allow a shutdown hook thread to update a
>> shared object?
>>
>>
>>
>>
>> _______________________________________________
>> tc-dev mailing list
>> [email protected]
>> http://lists.terracotta.org/mailman/listinfo/tc-dev
>
>
>
>
> _______________________________________________
> tc-dev mailing list
> [email protected]
> http://lists.terracotta.org/mailman/listinfo/tc-dev
_______________________________________________
tc-dev mailing list
[email protected]
http://lists.terracotta.org/mailman/listinfo/tc-dev

Reply via email to