I have a singleton that generates monotonically increasing ids for my SWING app. Although the singleton will be unloaded when the SWING app terminates; I suspect that the app will be running for like 8 hours a day. Is there a way to replace the singleton ?
author and iconoclast
Your singleton will of course be unloaded once your application is terminated and exit JVM. Are you saying you want the id to keep increment even after close and restart of your application? In that case, I guess you can serialized your counter class.