Java library for controlling process lifecycle

212 Views Asked by At

Is there a good java library/framework that can help me in persisting the state of my process periodically?

Basically I have a long running process that stores many data structures and runtime configurations. Since the state of the code is not very stable, it often crashes or needs to be restarted. Also, occasionally we need to update the code base for a bugfix/optimisation and would like to resume the run from where it was when we last killed the process.

It would be nice if there is a library that can help us out with the plumbing of persisting data, managing the threads for persistency etc. I was thinking that for 99% of use cases, annotating the relevant fields themselves would be the cleanest solution (if I would write such a library), similar to POJO annotations when persisting to a database.

1

There are 1 best solutions below

0
On

I don't know, how much EE is in your software, but implementing processes using the activiti framework helped us a lot. It allows bpm, custom code, restarting etc pp and even comes up with a web based process monitor.

It leverages relational databases to hold process state.

http://activiti.org/