Store an object in a batch transaction

  1. 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.
  2. Synchronize on the object.
  3. Invoke commit() as necessary. If any commit in the batch fails, the entire batch transaction fails.
Previous topic: Store persistent data

Was this information helpful? Send us your comments.