Store an object in a batch transaction
- To use a batch transaction to commit objects to the persistent store, invoke PersistentStore.getSynchObject(). This method retrieves the persistent store monitor that locks the object.
- Synchronize on the object.
- Invoke commit() as necessary. If any commit in the batch fails, the entire batch transaction fails.
Next topic: Working with the persistent store
Previous topic: Store persistent data