DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=30252>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=30252 putting two files by two threads resulting in Internal Server Error ------- Additional Comments From [EMAIL PROTECTED] 2004-07-28 08:17 ------- Now I use slide2.1M1 and use the followed sample code to test multi-thread put files. public class TestCreateFile { public WebdavResource webdavResource1 = null; public WebdavResource webdavResource2 = null; private void init(){ HttpURL httpURL = null; try { httpURL = new HttpURL ("http://localhost:8080/slide".toCharArray()); httpURL.setUserinfo("root", "root"); webdavResource1 = new WebdavResource(httpURL); httpURL.setUserinfo("test", "test"); webdavResource2 = new WebdavResource(httpURL); } catch (Exception ex) { httpURL = null; webdavResource1 = null; webdavResource2 = null; } } public static void main(String[] args) { TestCreateFile test = new TestCreateFile(); test.init(); new CreateFileThread (test.webdavResource1,"test1.txt").start(); new CreateFileThread (test.webdavResource2,"test2.txt").start(); } } class CreateFileThread extends Thread{ private WebdavResource webdavResource = null; private String filename = null; public CreateFileThread(WebdavResource webdavResource,String filename) { this.webdavResource = webdavResource; this.filename = filename; } public void run() { try { File file = new File("d://test//" + filename); if (file.exists()) { if (webdavResource.putMethod ("/slide/files/"+filename,file)) { System.out.println("load " + filename + " success."); } else { System.out.println("load " + filename + " failed."); } } } catch(HttpException e2){ } catch (IOException e1) { } } } I get the result one success and one fail mostly.The tomcat show the message: org.apache.slide.store.impl.rdbms.MySqlRDBMSAdapter - WARNING - 1213: Deadlock resolved on /files/test1.txt org.apache.slide.util.event.EventLogger - INFO - Recieved event with name 'transaction:rollback': org.apache.slide.event.TransactionEvent [EMAIL PROTECTED] Thread-4, 28-七月-2004 15:06:24, root, PUT, 409 "Conflict", 581 ms, /files/test1 .txt --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
