cmailleux    2005/10/10 18:22:17 CEST

  Modified files:
    core/src/java/org/jahia/engines/addcontainer 
                                                 AddContainer_Engine.java 
  Log:
  Move ensure list to avoid creating lock key with id=0 then create list and 
then allow to add instead of locking
  
  Revision  Changes    Path
  1.30      +3 -3      
jahia/core/src/java/org/jahia/engines/addcontainer/AddContainer_Engine.java
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/jahia/core/src/java/org/jahia/engines/addcontainer/AddContainer_Engine.java.diff?r1=1.29&r2=1.30&f=h
  
  
  
  Index: AddContainer_Engine.java
  ===================================================================
  RCS file: 
/home/cvs/repository/jahia/core/src/java/org/jahia/engines/addcontainer/AddContainer_Engine.java,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- AddContainer_Engine.java  7 Oct 2005 16:32:20 -0000       1.29
  +++ AddContainer_Engine.java  10 Oct 2005 16:22:16 -0000      1.30
  @@ -224,12 +224,12 @@
               LockService lockRegistry = ServicesRegistry.getInstance().
                       getLockService();
               if (jParams.settings().areLocksActivated()) {
  -                LockKey lockKey = LockKey.composeLockKey(LockKey.
  -                        ADD_CONTAINER_TYPE,
  -                        theContainer.getListID(), theContainer.getPageID());
                   // We must ensure the presence of container list to put lock 
for the first time user trying to add
                   // some content in this list
                   ensureContainerList(theContainer, engineMap, jParams);
  +                LockKey lockKey = LockKey.composeLockKey(LockKey.
  +                        ADD_CONTAINER_TYPE,
  +                        theContainer.getListID(), theContainer.getPageID());
                   if (!lockRegistry.acquire(lockKey, user,
                           user.getUserKey(),
                           jParams.getSessionState().
  

Reply via email to