Details
-
New Feature
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.4
-
None
-
None
Description
When using JCR2SPI with a custom SPI, getProperty is called when one attempts to set a new property value with disregard to the previous value. The current JCR2SPI implementation causes a getPropertyInfo, which requests the old value from the back-end. This is fundamentally unsound, and kills performance.
An SPI has no choice but to guard against this by returning a PropertyInfo proxy that performs lazy-loading of the value. The problem is that if an error occurs when dereferencing the value, and when performing the lazy-load, JCR2SPI is ill-suited to hande an unchecked exception at such a time. Besides, it is a "hack upon a hack", because JCR2SPI could do this work itself, by making proper use of the SPI functions for requesting property type information.