A Castor query that is not read-only can have performance implications.
Even if castor creates a lock on an object it does not prevent other threads from reading or writing to it. Read-only queries are also about 7 times faster compared with default shared mode.
Example 1: The following example specifies the query mode as SHARED
which allows both read and write access.
results = query.execute(Database.SHARED);
[1] Standards Mapping - Security Technical Implementation Guide Version 3 - (STIG 3) APP3500 CAT II
[2] ExoLab Group Castor JDO - Best practice
[3] Standards Mapping - Common Weakness Enumeration - (CWE) CWE ID 265
[4] Standards Mapping - Payment Card Industry Data Security Standard Version 1.2 - (PCI 1.2) Requirement 7.1.1
[5] Standards Mapping - Payment Card Industry Data Security Standard Version 2.0 - (PCI 2.0) Requirement 7.1.1