Author: bago
Date: Mon May 12 02:52:59 2008
New Revision: 655453

URL: http://svn.apache.org/viewvc?rev=655453&view=rev
Log:
Remove "bad" synchronization on James.class with custom counter: replaced with 
local synchronization/counter + custom naming scheme (identical to James one 
but adds a final "L" to the name)

Modified:
    
james/server/trunk/spoolmanager-function/src/main/java/org/apache/james/transport/mailets/ToMultiRepository.java

Modified: 
james/server/trunk/spoolmanager-function/src/main/java/org/apache/james/transport/mailets/ToMultiRepository.java
URL: 
http://svn.apache.org/viewvc/james/server/trunk/spoolmanager-function/src/main/java/org/apache/james/transport/mailets/ToMultiRepository.java?rev=655453&r1=655452&r2=655453&view=diff
==============================================================================
--- 
james/server/trunk/spoolmanager-function/src/main/java/org/apache/james/transport/mailets/ToMultiRepository.java
 (original)
+++ 
james/server/trunk/spoolmanager-function/src/main/java/org/apache/james/transport/mailets/ToMultiRepository.java
 Mon May 12 02:52:59 2008
@@ -26,7 +26,6 @@
 import org.apache.avalon.framework.service.ServiceException;
 import org.apache.avalon.framework.service.ServiceManager;
 import org.apache.james.Constants;
-import org.apache.james.James;
 import org.apache.james.core.MailImpl;
 import org.apache.james.services.MailRepository;
 import org.apache.james.services.MailServer;
@@ -248,11 +247,11 @@
      */
     public String getId() {
         long localCount = -1;
-        synchronized (James.class) {
+        synchronized (this) {
             localCount = count++;
         }
         StringBuffer idBuffer = new StringBuffer(64).append("Mail").append(
-                System.currentTimeMillis()).append("-").append(localCount);
+                
System.currentTimeMillis()).append("-").append(localCount).append('L');
         return idBuffer.toString();
     }
 
@@ -321,7 +320,7 @@
                 String[] addressParts = userName.split("@");
                 userName = addressParts[0];
             }
-                       
+                        
             StringBuffer destinationBuffer = new StringBuffer(192).append(
             repositoryUrl).append(userName).append("/");
             String destination = destinationBuffer.toString();



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to