Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Timer Instances  RSS feed

 
nitin pai
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If Timer instances must not be serializable then how can they be persistant and survive container crashes?
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would guess that not the actual Timer objects are persisted, but all data that is needed to reconstruct them from scratch after a restart.
 
nitin pai
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf, That is true. But say, when a container crashes, how would it retrieve the timer instance details if it had not been persisted, on a restart?
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why would the necessary data not have been persisted? That should be one of the first things it would do after the timer had been created.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!