Magnolia is optimistic software ;) The only time locks are used is during activation to guard multiple activation requests. And even there we don't really care which node picks the request as long as one of them does so. Your case is bit morecomplicated since you need to grab the lock and force release (if not done automatically) when issuing node goes down. Either way, there's nothing in Magnolia to help with that unless you start jobs similarly to what Magnolia does during activation - have a job to just issue a request to given URI to execute the job. First node to pick that request will execute the job. If more requests (from other node) arrive for the same job while it is still running, skip them (or do some more guarded checking like giving jobs execution id updated after each run and checking that requested id is already in progress (or even finished)). Since when going over HTTP you address whole server you don't care which node does the thing as long as there is at least one running. But again there's most likely more effective and "internal" solution that can be created using JR API.
Cheers, Jan On Oct 19, 2011, at 9:07 PM, Danilo Ghirardelli wrote: > >> should help http://jackrabbit.apache.org/concurrency-control.html > > I read that, it explains very well the locking mechanism, but it misses a > couple of points... The cluster-level lock is automatically obtained every > time a write lock is requested? Or it should be obtained explicitly? And how? > Or simply everything is already done in Magnolia underneath? > Honestly I never found much code related to locking in the Magnolia code I > have read, but obviously I didn't read it all... > > Regards, Danilo. > > > > ---------------------------------------------------------------- > For list details see > http://www.magnolia-cms.com/community/mailing-lists.html > To unsubscribe, E-mail to: <[email protected]> > ---------------------------------------------------------------- ---------------------------------------------------------------- For list details see http://www.magnolia-cms.com/community/mailing-lists.html To unsubscribe, E-mail to: <[email protected]> ----------------------------------------------------------------
