Hi,

On Wed, May 15, 2013 at 10:14 AM, Dimitar Dimitrov <[email protected]> wrote:
>... I have a problem with getting the property value when I use a Quartz
> Scheduler job. The problem is that the session which is used to put the job
> into the scheduler, becomes closed when the jobs tries to fire the event...

That's by design, JCR sessions that Sling opens during request
processing are closed once done processing the request.

If you need a Session and you don't have a Request (as in job
processing), you'll need to open it yourself.

JCR sessions are cheap so it's ok to open one just to do a few things
and close it immediately. Or you can have a long-lived Session in the
service that processes your jobs, but note that Sessions should not be
shared between threads.

You can use Session. impersonate(...) to transform a session that you
got with loginAdministrative into one that doesn't have admin rights.

-Bertrand

Reply via email to