Author: nthaker
Date: Thu Jan 10 08:34:16 2008
New Revision: 610839

URL: http://svn.apache.org/viewvc?rev=610839&view=rev
Log:
WS-COMMONS-284

Modified:
    
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/part/PartOnFile.java

Modified: 
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/part/PartOnFile.java
URL: 
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/part/PartOnFile.java?rev=610839&r1=610838&r2=610839&view=diff
==============================================================================
--- 
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/part/PartOnFile.java
 (original)
+++ 
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/part/PartOnFile.java
 Thu Jan 10 08:34:16 2008
@@ -33,6 +33,7 @@
 import org.apache.axiom.attachments.Part;
 import org.apache.axiom.attachments.PushbackFilePartInputStream;
 import org.apache.axiom.om.OMException;
+import org.apache.axiom.om.util.UUIDGenerator;
 /*
  * PartOnFile stores Attachment part data in to a File
  * and provides a DataHandler to access it. 
@@ -65,7 +66,11 @@
                 throw new IllegalArgumentException("Given Axis2 Attachment 
File Cache Location "
                     + repoDir + "  should be a directory.");
             }
-            cacheFile = File.createTempFile("Axis2", ".att", repoDirFile);
+            //Generate uniqu UUID
+            String id = UUIDGenerator.getUUID();
+            //repleace all colon with underscore
+            id = id.replaceAll(":", "_");
+            cacheFile = File.createTempFile("Axis2"+id, ".att", repoDirFile);
 
             FileOutputStream fileOutStream = new FileOutputStream(cacheFile);
             int value;



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

Reply via email to