[exo-jcr-commits] exo-jcr SVN: r4713 - jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core.

do-not-reply at jboss.org do-not-reply at jboss.org
Tue Aug 9 06:00:24 EDT 2011


Author: areshetnyak
Date: 2011-08-09 06:00:23 -0400 (Tue, 09 Aug 2011)
New Revision: 4713

Modified:
   jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionImpl.java
Log:
EXOJCR-1472 : The fix to avoid use IdGenerator.generate() as id of  SessionImpl was committed.

Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionImpl.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionImpl.java	2011-08-09 09:50:09 UTC (rev 4712)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionImpl.java	2011-08-09 10:00:23 UTC (rev 4713)
@@ -73,6 +73,7 @@
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+import java.util.concurrent.atomic.AtomicLong;
 
 import javax.jcr.AccessDeniedException;
 import javax.jcr.Credentials;
@@ -125,6 +126,8 @@
       }
    }
 
+   private static final AtomicLong SEQUENCE = new AtomicLong();
+   
    public static final int DEFAULT_LAZY_READ_THRESHOLD = 100;
 
    private final RepositoryImpl repository;
@@ -193,7 +196,7 @@
       this.workspaceName = workspaceName;
       this.container = container;
       this.live = true;
-      this.id = IdGenerator.generate();
+      this.id = System.currentTimeMillis() + "_" + SEQUENCE.incrementAndGet();
       this.userState = userState;
       this.txResourceManager =
          (TransactionableResourceManager)container.getComponentInstanceOfType(TransactionableResourceManager.class);



More information about the exo-jcr-commits mailing list