[Contrib: Evaluation System] AARON: Advice about dao.obtainLock()

Aaron Zeckoski azeckoski at unicon.net
Thu Dec 8 07:54:22 PST 2011


If you need to access them there you would have to add them to one of
the low level logic services. It's probably a good addition to have.
:-)
-AZ


On Thu, Dec 8, 2011 at 10:27 AM, Jim Eng <jimeng at umich.edu> wrote:
> Hi Aaron,
>
> The eval dao has methods to obtain and release a lock, with the primary intention being that a server obtains a lock on a process so it is done by one and only one server in the cluster.  This seems perfect for what I want to do in org.sakaiproject.evaluation.logic.scheduling.ConsolidatedNotificationsJobImpl, but it doesn't seem like it's available there.  The classes in that package use the logic-layer rather than the dao.  Other than a few test classes, the only places I see the dao.obtainLock() method called is within two methods in the authoring service and the eval setup service.  I would like to call dao.obtainLock() at the beginning of the execute() method in ConsolidatedNotificationsJobImpl and then release the lock at the end of that method.
>
> Would it make sense to add methods similar to dao.obtainLock() and dao.releaseLock() to one of the logic interfaces so they could be used in places where the dao should not be accessed?
>
> I'd appreciate any advice you can give.
>
> Thanks.
>
> Jim



-- 
Aaron Zeckoski - Software Architect - http://tinyurl.com/azprofile


More information about the evaluation mailing list