We are implementing an ObjectManager that is an API to replace ObjectAdapterProvider, PersistenceSession and others that are closely coupled with JDO.
Following a chain of responsibility pattern ObjectManager is setup with a couple of handlers for different responsibilities, these are:
1. Object creation, newing up from a given ObjectSpecification, initializing defaults and resolving injection points if required.
2. Object re-creation from a given ObjectSpecification + Object-Identifier, resolving injection points if required.
3. Object persisting for a given ObjectSpecification and the actual Object a pojo. Conceptually this might also include aspects of serializing ManagedObjects into in-memory mementos.