From general-return-7873-apmail-xml-general-archive=xml.apache.org@xml.apache.org Mon Oct 22 09:21:59 2012 Return-Path: X-Original-To: apmail-xml-general-archive@www.apache.org Delivered-To: apmail-xml-general-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D101AD78C for ; Mon, 22 Oct 2012 09:21:59 +0000 (UTC) Received: (qmail 88280 invoked by uid 500); 22 Oct 2012 09:21:59 -0000 Delivered-To: apmail-xml-general-archive@xml.apache.org Received: (qmail 87912 invoked by uid 500); 22 Oct 2012 09:21:53 -0000 Mailing-List: contact general-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: general@xml.apache.org List-Id: Delivered-To: mailing list general@xml.apache.org Received: (qmail 87879 invoked by uid 99); 22 Oct 2012 09:21:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Oct 2012 09:21:52 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.26 as permitted sender) Received: from [216.139.236.26] (HELO sam.nabble.com) (216.139.236.26) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Oct 2012 09:21:46 +0000 Received: from telerig.nabble.com ([192.168.236.162]) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1TQECM-0007Iz-7V for general@xml.apache.org; Mon, 22 Oct 2012 02:21:26 -0700 Message-ID: <34585906.post@talk.nabble.com> Date: Mon, 22 Oct 2012 02:21:26 -0700 (PDT) From: pa7751 To: general@xml.apache.org Subject: Multi threading and xml MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_86_22155497.1350897686223" X-Nabble-From: pa7751@gmail.com X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_86_22155497.1350897686223 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi I have an xml file that has to be written by multiple threads running in parallel. How can we ensure that the structural integrity of the xml file i.e. many threads writing into the file can spoil the structure of the xml. One way is to make the write method synchronized, but that is a very high level approach with which only one thread may write at a time. So the other threads are ready with their data but cannot write until the lock is released. Is there a better way to do this? -- View this message in context: http://old.nabble.com/Multi-threading-and-xml-tp34585906p34585906.html Sent from the Apache XML - General mailing list archive at Nabble.com. ------=_Part_86_22155497.1350897686223 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit Hi I have an xml file that has to be written by multiple threads running in parallel. How can we ensure that the structural integrity of the xml file i.e. many threads writing into the file can spoil the structure of the xml. One way is to make the write method synchronized, but that is a very high level approach with which only one thread may write at a time. So the other threads are ready with their data but cannot write until the lock is released. Is there a better way to do this?

View this message in context: Multi threading and xml
Sent from the Apache XML - General mailing list archive at Nabble.com.
------=_Part_86_22155497.1350897686223--