[exo-jcr-commits] exo-jcr SVN: r4712 - in jcr/branches/1.12.x/patch/1.12.10-GA: JCR-1654 and 1 other directory.
do-not-reply at jboss.org
do-not-reply at jboss.org
Tue Aug 9 05:50:09 EDT 2011
Author: areshetnyak
Date: 2011-08-09 05:50:09 -0400 (Tue, 09 Aug 2011)
New Revision: 4712
Added:
jcr/branches/1.12.x/patch/1.12.10-GA/JCR-1654/
jcr/branches/1.12.x/patch/1.12.10-GA/JCR-1654/JCR-1654.patch
Log:
JCR-1654 : Patch for avoid use IdGenerator.generate() as is id SessionImpl was committed.
Added: jcr/branches/1.12.x/patch/1.12.10-GA/JCR-1654/JCR-1654.patch
===================================================================
--- jcr/branches/1.12.x/patch/1.12.10-GA/JCR-1654/JCR-1654.patch (rev 0)
+++ jcr/branches/1.12.x/patch/1.12.10-GA/JCR-1654/JCR-1654.patch 2011-08-09 09:50:09 UTC (rev 4712)
@@ -0,0 +1,38 @@
+Index: exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionImpl.java
+===================================================================
+--- exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionImpl.java (revision 4711)
++++ exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/SessionImpl.java (working copy)
+@@ -49,7 +49,6 @@
+ import org.exoplatform.services.jcr.impl.xml.exporting.BaseXmlExporter;
+ import org.exoplatform.services.jcr.impl.xml.importing.ContentImporter;
+ import org.exoplatform.services.jcr.impl.xml.importing.StreamImporter;
+-import org.exoplatform.services.jcr.util.IdGenerator;
+ import org.exoplatform.services.security.ConversationState;
+ import org.exoplatform.services.security.Identity;
+ import org.xml.sax.ContentHandler;
+@@ -67,6 +66,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;
+@@ -100,6 +100,8 @@
+ public class SessionImpl implements ExtendedSession, NamespaceAccessor
+ {
+
++ private static final AtomicLong SEQUENCE = new AtomicLong();
++
+ public static final int DEFAULT_LAZY_READ_THRESHOLD = 100;
+
+ private final RepositoryImpl repository;
+@@ -150,7 +152,7 @@
+ this.workspaceName = workspaceName;
+ this.container = container;
+ this.live = true;
+- this.id = IdGenerator.generate();
++ this.id = System.currentTimeMillis() + "_" + SEQUENCE.incrementAndGet();
+ this.userState = userState;
+
+ this.repository = (RepositoryImpl)container.getComponentInstanceOfType(RepositoryImpl.class);
More information about the exo-jcr-commits
mailing list