Hi All, So i seem to have found a solution to the issue. basically i am using a lock around the the thread that calls the water marking component. no changes in the code i sent earlier.
Thanks for all the help. Subrah Mike Marchywka-2 wrote: > > > > > > > > > > ---------------------------------------- >> Date: Tue, 17 Nov 2009 12:22:09 -0800 >> From: >> To: itext-questions@lists.sourceforge.net >> Subject: Re: [iText-questions] Root Object is invalid or missing after >> PDF is manipulated with iTextSharp >> >> >> Sorry Just had a meeting ..i am running in to go/ no go situation here. >> quite a lot of files there(SVN).. any specfic ones you'd like me to look >> at >> for multi threading? >> >> i feel so close yet not fully there.. any help would be much appreciated >> here.. i have attached more files which were corrupted even though i used >> file stream instead of memory stream.. Atached are files >>an also search the keywords list: http://1t3xt.info/tutorials/keywords/ > > > > I haven't been following this in detail but, and someone who use itext > please correct me if wrong, generally the document processing is a single > threaded operation unless you try to split up tasks to avoid waiting for > IO etc. As I understood the OP, the problem seems to relate to using one > JVM to process separate pages concurrently. Asynchronous and indpenedent > requests come in and some how they get intermingled. This would seem > difficult as you would think each request sets up its own objects but > things like static variables or collections would be suspects- often these > are caches or general junk bins based on hashtables or other collections. > > Is the above essentially right? If so, I would also mention one more > philosophical note related to Java. Many base classes are synchronized so > everyone thinks they are thread safe but of course "safe" depends on what > you are trying to do. Apps generally find blanket class synchonization > useless > and an invitations for derived classes to create deadlock. > > So, further, you would hope that itext is NOT designed to be thread safe > unless > that idea can be reasonably defined for everyone who wants to use it. > > Also, everything else in your post just suggests it is a threading > problem- > unreproducible, confusing, or logically impossible results usually > are related to timing. In Java anyway, where you don't have the freedom to > corrupt memory, they almost always are. > > Mike Marchywka > > > > > > > > > > > _________________________________________________________________ > Hotmail: Trusted email with Microsoft's powerful SPAM protection. > http://clk.atdmt.com/GBL/go/177141664/direct/01/ > http://clk.atdmt.com/GBL/go/177141664/direct/01/ > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > 30-Day > trial. Simplify your report design, integration and deployment - and focus > on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > iText-questions mailing list > iText-questions@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/itext-questions > > Buy the iText book: http://www.1t3xt.com/docs/book.php > Check the site with examples before you ask questions: > http://www.1t3xt.info/examples/ > You can also search the keywords list: > http://1t3xt.info/tutorials/keywords/ > > -- View this message in context: http://old.nabble.com/Root-Object-is-invalid-or-missing-after-PDF-is-manipulated-with-iTextSharp-tp26305073p26417069.html Sent from the iText - General mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php Check the site with examples before you ask questions: http://www.1t3xt.info/examples/ You can also search the keywords list: http://1t3xt.info/tutorials/keywords/