jsr-283
  1. jsr-283
  2. JSR_283-442

Decision F2F Basel 07: add replace for Session.addLockToken and Session.removeLockToken

    Details

    • Type: Task Task
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: current
    • Fix Version/s: milestone 1
    • Component/s: locking
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      442

      Description

      As decided at the last f2f in basel:

      For backwards compability we decided for the Session interface:

      o Don't modify addLockToken/removeLockToken
      o Add replacement for addLockToken/removeLockToken that throws.

      -> change source and remove throw clause again from the existing methods.
      -> add new replacement methods.

      Suggestion:

      • addLockTokenToSession
      • removeLockTokenFromSession

        Issue Links

          Activity

          Hide
          anchela added a comment -

          Yet another idea. Instead of looking for alternative method names,
          what about:

          • Create new interface javax.jcr.lock.LockManager.java
          • Add javax.jcr.lock.Session.getLockManager() throws
            UnsupportedRepositoryOpExc., RepositoryExc.
          • Define LockManager to have the following methods (from Session and Node):

          > String[] getLockTokens()
          throws RepositoryException;
          > void addLockToken(String)
          throws LockException, RepositoryException
          > void removeLockToken(String)
          throws LockException, RepositoryException
          > Lock lock(String absPath, boolean isDeep, boolean isSessionScoped,
          long timeoutHint)
          throws PathNotFoundE, LockE, AccessDeniedE, InvalidItemStateE, RepositoryE
          > Lock getLock(String absPath)
          throws PathNotFoundE, LockE, AccessDeniedE, RepositoryE
          > void unlock(String absPath)
          throws PathNotFoundE, LockE, AccessDeniedE, InvalidItemStateE, RepositoryE
          > boolean holdsLock(String absPath)
          throws PathNotFoundE, RepositoryE
          > boolean isLocked(String absPath)
          throws PathNotFoundE, RepositoryE

          • and finally deprecate the locking related methods on Session and Node.
          Show
          anchela added a comment - Yet another idea. Instead of looking for alternative method names, what about: Create new interface javax.jcr.lock.LockManager.java Add javax.jcr.lock.Session.getLockManager() throws UnsupportedRepositoryOpExc., RepositoryExc. Define LockManager to have the following methods (from Session and Node): > String[] getLockTokens() throws RepositoryException; > void addLockToken(String) throws LockException, RepositoryException > void removeLockToken(String) throws LockException, RepositoryException > Lock lock(String absPath, boolean isDeep, boolean isSessionScoped, long timeoutHint) throws PathNotFoundE, LockE, AccessDeniedE, InvalidItemStateE, RepositoryE > Lock getLock(String absPath) throws PathNotFoundE, LockE, AccessDeniedE, RepositoryE > void unlock(String absPath) throws PathNotFoundE, LockE, AccessDeniedE, InvalidItemStateE, RepositoryE > boolean holdsLock(String absPath) throws PathNotFoundE, RepositoryE > boolean isLocked(String absPath) throws PathNotFoundE, RepositoryE and finally deprecate the locking related methods on Session and Node.
          Hide
          reschke added a comment -

          Not sure whether reducing complexity on Node methods is a goal for all of us.

          If it is, then I suppose this approach.

          Show
          reschke added a comment - Not sure whether reducing complexity on Node methods is a goal for all of us. If it is, then I suppose this approach.
          Hide
          reschke added a comment -

          Proposal to add LockManager, and to move the new methods over here was accepted
          during status call on 2008-06-02.

          Show
          reschke added a comment - Proposal to add LockManager, and to move the new methods over here was accepted during status call on 2008-06-02.
          Hide
          reschke added a comment -

          API updated with:

          /cvs/jsr-283/src/java/javax/jcr/Session.java,v <-- Session.java
          new revision: 1.30; previous revision: 1.29

          Checking in java/javax/jcr/Workspace.java;
          /cvs/jsr-283/src/java/javax/jcr/Workspace.java,v <-- Workspace.java
          new revision: 1.17; previous revision: 1.16

          Checking in java/javax/jcr/lock/LockManager.java;
          /cvs/jsr-283/src/java/javax/jcr/lock/LockManager.java,v <-- LockManager.java
          initial revision: 1.1

          Spec still needs to be updated.

          Show
          reschke added a comment - API updated with: /cvs/jsr-283/src/java/javax/jcr/Session.java,v <-- Session.java new revision: 1.30; previous revision: 1.29 Checking in java/javax/jcr/Workspace.java; /cvs/jsr-283/src/java/javax/jcr/Workspace.java,v <-- Workspace.java new revision: 1.17; previous revision: 1.16 Checking in java/javax/jcr/lock/LockManager.java; /cvs/jsr-283/src/java/javax/jcr/lock/LockManager.java,v <-- LockManager.java initial revision: 1.1 Spec still needs to be updated.
          Hide
          Peeter Piegaze added a comment -

          Spec fixed through addition of LockManager, as per Julian's changes already made to source
          Change in Julian's original code: name of LockManager.lock parameter from
          clientSuppliedOwnerInformation to ownerInfo

          Show
          Peeter Piegaze added a comment - Spec fixed through addition of LockManager, as per Julian's changes already made to source Change in Julian's original code: name of LockManager.lock parameter from clientSuppliedOwnerInformation to ownerInfo

            People

            • Assignee:
              reschke
              Reporter:
              anchela
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: