in reply to Re^2: File Locking plus delete Lockfile question
in thread File Locking plus delete Lockfile question

At one point in time, this ["checkin/checkout"] system will cease to exist.
Is there any other part of your application that will be able to unambigously detect/determine this time? If so, then can the cleanup code be inserted there? Or could a customer reactivate any checkin/out system at any time in the future?

Even in the latter case, I think you should be able to clean up inactive lockfiles if the cleanup code and the lockfile creation code are both protected by another application-wide lockfile (which never needs to be deleted).

Caveat: I haven't tried any of this out! I hope that my theoretical mullings will be of some use anyway :-)

--
use JAPH;
print JAPH::asString();

  • Comment on Re^3: File Locking plus delete Lockfile question

Replies are listed 'Best First'.
Re^4: File Locking plus delete Lockfile question
by rovf (Priest) on Feb 12, 2009 at 15:21 UTC
    Is there any other part of your application that will be able to unambigously detect/determine this time?

    Yes, but it is a bit inconvenient (that part would first have to identify the host where the respective instance had been executed, and while this is technically possible, it is a bit "against the priciples" of the dispatching tools, which adhere the principle that the manager should not care where its instances are executed). But if necessary, it *can* be done, and this would have been my "plan B" if the locking policy would not have worked out.

    Fortunately, after the precious comment of JavaFan, I think my revised design is sound and will do what I expected (I still need to test it, of course).

    -- 
    Ronald Fischer <ynnor@mm.st>