I need to serialize a Java Process (to persistent storage such as a disk) followed by killing it.
Then at a later time De-serialize it and re-resurrect it at a later date.
Constraints:
- I already have a set of process that I want to add this feature to.
- I am therefore looking for a solution that is minimally invasive.
- The processes have code that will re-establish connections to resources such as sockets, DBs etc.
- What I need to do is persist the thread statuses, variables, objects, etc.
NOTE:
- I have decent knowledge of the issues surrounding the serializing of an Object Graph.
- Many years ago I'd conceptually figured out how to do this using AspectJ but I can't find my notes
- This question pertains to Java Process only -- so the solution would work on say a JVM running on OSX, Linux, or Windows
- The process in question would be refactor-able to achieve this functionality.