hmmm... this looks interesting. I have played with Terracotta distributed events & distributed methods & they work well but I did not have any idea about cluster events. Although, before I look deep into this article, I am wondering if the cluster event "Local client disconnecting from a TC server" is guaranteed to work? Is this like a wrapper on top of a shutdown hook provided by Terracotta? I mean if there's only one Terracotta client left in the cluster & if I do a Ctrl-C to shutdown the JVM, will this cluster event fire for sure?
Thanks Prasad >>> "Steven Harris" <[EMAIL PROTECTED]> 8/28/2007 2:32 PM >>> Have you looked at cluster events for this kind of things? http://www.terracotta.org/confluence/display/docs1/JMX+Guide On Aug 28, 2007, at 12:28 PM, Prasad Bopardikar 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
