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 "Andy Jefferson (JIRA)" <ji...@apache.org> on 2008/06/23 09:22:45 UTC
[jira] Created: (JDO-597) PMF : Add "readOnly" setting for better
handling of read-only datastores
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, specification
Reporter: Andy Jefferson
Fix For: JDO 2 maintenance release 2
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.
[jira] Commented: (JDO-597) PMF : Add "readOnly" setting for better
handling of read-only datastores
Posted by "Craig Russell (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JDO-597?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12622959#action_12622959 ]
Craig Russell commented on JDO-597:
-----------------------------------
svn commit -m "JDO-597 Add more diagnostics to ReadOnly tests" src/java/org/apache/jdo/tck/api/persistencemanagerfactory/FlushThrowsIfReadOnly.java
Sending src/java/org/apache/jdo/tck/api/persistencemanagerfactory/FlushThrowsIfReadOnly.java
Transmitting file data .
Committed revision 686305.
> 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.
[jira] Commented: (JDO-597) PMF : Add "readOnly" setting for better
handling of read-only datastores
Posted by "Craig Russell (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JDO-597?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12623051#action_12623051 ]
Craig Russell commented on JDO-597:
-----------------------------------
Loading the oid class did the trick.
svn commit -m "JDO-597 Make sure oid class is loaded"
Sending tck2/src/java/org/apache/jdo/tck/api/persistencemanagerfactory/FlushThrowsIfReadOnly.java
Transmitting file data .
Committed revision 686413.
> 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.
[jira] Commented: (JDO-597) PMF : Add "readOnly" setting for better
handling of read-only datastores
Posted by "Craig Russell (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JDO-597?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12608811#action_12608811 ]
Craig Russell commented on JDO-597:
-----------------------------------
Need TCK tests for this as well.
Since we don't specify when an exception is thrown, probably need to do something like for all cases that should throw:
try {
pm = pmf.getPM();
pm.currentTransaction().begin();
pm.makePersistent(anInstance);
pm.currentTransaction().commit();
} catch (JDOReadOnlyException ex) {
// good
}
fail
> 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
> 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.
[jira] Updated: (JDO-597) PMF : Add "readOnly" setting for better
handling of read-only datastores
Posted by "Andy Jefferson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JDO-597?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andy Jefferson updated JDO-597:
-------------------------------
Component/s: api2-legacy
> 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
> 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.
[jira] Commented: (JDO-597) PMF : Add "readOnly" setting for better
handling of read-only datastores
Posted by "Andy Jefferson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JDO-597?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12622837#action_12622837 ]
Andy Jefferson commented on JDO-597:
------------------------------------
The latter two tests seem to have an error. The localSetup creates a "pmf2" that is read only. The first test gets its PM from "pmf2". The latter two tests just call getPM(), hence not using the readonly PMF.
> 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.
[jira] Updated: (JDO-597) PMF : Add "readOnly" setting for better
handling of read-only datastores
Posted by "Andy Jefferson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JDO-597?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andy Jefferson updated JDO-597:
-------------------------------
Attachment: JDOReadOnlyException.patch
Patch to add JDOReadOnlyException to "api2" project
> 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, specification
> Reporter: 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.
[jira] Reopened: (JDO-597) PMF : Add "readOnly" setting for better
handling of read-only datastores
Posted by "Craig Russell (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JDO-597?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Craig Russell reopened JDO-597:
-------------------------------
After making the changes suggested by Andy (thanks!), the test now works with datastore identity but fails with application identity.
> 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.
[jira] Commented: (JDO-597) PMF : Add "readOnly" setting for better
handling of read-only datastores
Posted by "Andy Jefferson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JDO-597?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12608666#action_12608666 ]
Andy Jefferson commented on JDO-597:
------------------------------------
SVN trunk now has the JDOReadOnlyException, and the setter/getter on the PMF.
One thing to add : the default for this property should probably be false, since default JDO usage will be to persist data.
> 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
> 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.
[jira] Commented: (JDO-597) PMF : Add "readOnly" setting for better
handling of read-only datastores
Posted by "Craig Russell (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JDO-597?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12622985#action_12622985 ]
Craig Russell commented on JDO-597:
-----------------------------------
Added constants to signatures file.
svn commit -m "JDO-597 Update signatures for readonly Constants" src/conf/jdo-2_2-signatures.txt
Sending src/conf/jdo-2_2-signatures.txt
Transmitting file data .
Committed revision 686326.
> 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.
[jira] Resolved: (JDO-597) PMF : Add "readOnly" setting for better
handling of read-only datastores
Posted by "Craig Russell (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JDO-597?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Craig Russell resolved JDO-597.
-------------------------------
Resolution: Fixed
All tck tests now pass.
> 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.
[jira] Commented: (JDO-597) PMF : Add "readOnly" setting for better
handling of read-only datastores
Posted by "Andy Jefferson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JDO-597?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12622979#action_12622979 ]
Andy Jefferson commented on JDO-597:
------------------------------------
The log entry "2) Id "org.apache.jdo.tck.pc.company.Company$Oid: 1" has not determined to the class"
suggests that the OID class (passed in to pm.getObjectById) is not known about, and indeed it is a custom PK class and "Company" has not been mentioned during that PMF2's existence, so no metadata is loaded at that point. Consequently DataNucleus has no way of knowing what (persistable) class this PK class refers to and so cannot find the object. Perhaps if you did a pm.getExtent(Company.class) first (to give the implementation knowledge and hence load the metadata) then it would get the object from the id
> 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.
[jira] Commented: (JDO-597) PMF : Add "readOnly" setting for better
handling of read-only datastores
Posted by "Craig Russell (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JDO-597?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12622902#action_12622902 ]
Craig Russell commented on JDO-597:
-----------------------------------
Good catch.
svn commit -m "JDO-597 fix tests to fail if error; thanks, Andy"
Sending tck2/src/java/org/apache/jdo/tck/api/persistencemanagerfactory/FlushThrowsIfReadOnly.java
Transmitting file data .
Committed revision 686260.
> 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.
[jira] Commented: (JDO-597) PMF : Add "readOnly" setting for better
handling of read-only datastores
Posted by "Craig Russell (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JDO-597?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12608573#action_12608573 ]
Craig Russell commented on JDO-597:
-----------------------------------
Good so far. A patch for PMF.java is next?
We can start with PMF and later add a property to Transaction and/or PM if we want/need to.
> 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, specification
> Reporter: 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.
[jira] Resolved: (JDO-597) PMF : Add "readOnly" setting for better
handling of read-only datastores
Posted by "Craig Russell (JIRA)" <ji...@apache.org>.
[ 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.