sling-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brendan Robert <>
Subject RE: Sling Models feature proposal: Adding transparent persistence support
Date Mon, 24 Jun 2019 19:15:58 GMT
I agree that autosave might make a large performance improvement for large operations, but
I feel like that would require some kind of overseer to make any automatic behavior work correctly.
 A fair compromise would be to add an optional call to specify autocommit as an optional Boolean
(with the default value being true because a lot of times this will be used for a single record.)
 Anyone using the autocommit = false assumes the responsibility of committing changes.   If
we’re saying the same thing then great, I’ll open a new issue for that so the effort is
tracked against that.  I’m concerned about some edge cases making this a little tricky,
but I’ll save my breath for Jira. 😃


Sent from Mail<> for Windows 10

From: Nicolas Peltier <>
Sent: Monday, June 3, 2019 6:54:36 AM
Subject: Re: Sling Models feature proposal: Adding transparent persistence support

Hi Brendan,

this is great! I agree with Carsten's feedback in the ticket that we should
stick in the naming and in the code (RepositoryException e.g.) to the
resource persistence layer.
Also, i would find interesting to have an option to defer the commit to an
upper layer, in case you have many "persist" operations in a row, this
would be suboptimal. Something like an autosave flag.

Le lun. 3 juin 2019 à 12:12, Brendan Robert <> a
écrit :

> I have submitted a new module for consideration which adds a new
> persistence service.  This service allows saving a java bean back to the
> JCR.  This allows sling models to be 2-way model beans, useful for all
> kinds of business logic automation and integration scenarios.
> For more information and the donated code including unit test coverage,
> see the jira issue SLING-8450.
> Thanks for considering this feature!
> -Brendan Robert
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message