Uploaded image for project: 'JDO'
  1. JDO
  2. JDO-597

PMF : Add "readOnly" setting for better handling of read-only datastores

    XMLWordPrintableJSON

Details

    Description

      A user has a datastore that is outside their control and they either don't have permission to write to it, or maybe they have permissions but don't want to write to it. They want a better way of handling this, preventing updates to the datastore.

      Propose :-
      PMF property (with setter/getter)
      javax.jdo.option.ReadOnly - values true | false

      JDOReadOnlyException extends JDOUserException

      Behaviour :-
      When readOnly is set to true :-
      Any operation resulting in a creation/modification of an object to be sent to the datastore should throw a JDOReadOnlyException. This may be at commit(), flush(), or alternatively at makePersistent() when using datastore txns, or query.deletePersistentAll(). That is, no change should be made to the datastore contents at all.

      Attachments

        1. JDOReadOnlyException.patch
          2 kB
          Andy Jefferson

        Activity

          People

            andyj Andy Jefferson
            andyj Andy Jefferson
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: