You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jdo-dev@db.apache.org by "Craig Russell (JIRA)" <ji...@apache.org> on 2008/08/14 00:18:44 UTC

[jira] Resolved: (JDO-597) PMF : Add "readOnly" setting for better handling of read-only datastores

     [ https://issues.apache.org/jira/browse/JDO-597?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Craig Russell resolved JDO-597.
-------------------------------

    Resolution: Fixed
      Assignee: Andy Jefferson

Test cases for the get/setReadOnly and behavior are checked in.

Both jdoconfig_2_2.xsd and jdoconfig_2_2.dtd are checked in.

The spec dated 13-August has the changes.

svn commit -m "JDO-597 Add ReadOnly property to PMF" . ../api2
Sending        api2/src/java/javax/jdo/Constants.java
Sending        api2/src/schema/javax/jdo/jdoconfig_2_2.xsd
Sending        tck2/src/conf/pmf.conf
Adding         tck2/src/java/org/apache/jdo/tck/api/persistencemanagerfactory/FlushThrowsIfReadOnly.java
Adding         tck2/src/java/org/apache/jdo/tck/api/persistencemanagerfactory/SetReadOnly.java
Transmitting file data .....
Committed revision 685700.
svn commit -m "JDO-597 Add ReadOnly property to PMF: jdoconfig_2_2.dtd" ../api2
Adding         api2/src/schema/javax/jdo/jdoconfig_2_2.dtd
Transmitting file data .
Committed revision 685704.



> PMF : Add "readOnly" setting for better handling of read-only datastores
> ------------------------------------------------------------------------
>
>                 Key: JDO-597
>                 URL: https://issues.apache.org/jira/browse/JDO-597
>             Project: JDO
>          Issue Type: New Feature
>          Components: api2, api2-legacy, specification
>            Reporter: Andy Jefferson
>            Assignee: Andy Jefferson
>             Fix For: JDO 2 maintenance release 2
>
>         Attachments: JDOReadOnlyException.patch
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.