commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alan Pocklington <...@pocko.freeserve.co.uk>
Subject RE: Digester and Threads Question
Date Thu, 25 Mar 2004 12:27:00 GMT
Many thanks for answering my question.  That's a great help!

Now I can get started.

Alan.


"James Carman" <james@carmanconsulting.com> wrote in
news:000a01c411bd$ba498cd0$7153058f@carmani600m: 

> As long as you use a new Digester each time (like as a local variable
> inside a method), you'll be fine.  What that means is that you CANNOT
> use one single digester instance in multiple threads at the same time.
> 
> -----Original Message-----
> From: Alan Pocklington [mailto:ajp@pocko.freeserve.co.uk] 
> Sent: Wednesday, March 24, 2004 11:24 AM
> To: commons-user@jakarta.apache.org
> Subject: Digester and Threads Question
> 
> Hi,
> 
> I want to use the Digester in a web application to parse XML documents
> on the fly.  Basically, the user logs in and his corresponding XML
> file is loaded from the database, parsed using Digester and displayed
> to the user for manipulation.
> 
> I'm concerned about the following line in the JavaDoc:
> 
> "A single Digester instance may only be used within the context of a
> single thread at a time, and a call to parse() must be completed
> before another can be initiated even from the same thread."
> 
> I'm not sure if I fully understand what this is saying. Will this mean
> I will face problems using the Digester in the above way in a web 
> application?  Is it saying that I can use only one digester instance
> to service all requests, or will it be okay to put Digester code in my
> servlet 
> 
> which will create a Digester for each request?
> 
> Please help, I'm confused.
> 
> Thanks in advance,
> 
> Alan.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message