You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Torsten Krah <tk...@fachschaft.imn.htwk-leipzig.de> on 2012/03/13 20:16:27 UTC

[digester3] - can DigesterLoader instance be shared?

Hi,

Digester instance are not thread-safe as metioned by the docs. I wonder 
if a DigesterLoader instance can be shared between different threads, if 
each thread does create its own Digester instance via newDigester() - or 
should each thread create its own Loader (all are using the same rules 
file).

So - is it safe to share it or not?

Torsten


Re: [digester3] - can DigesterLoader instance be shared?

Posted by Simone Tripodi <si...@apache.org>.
Thanks a lot for the feedbacks Torsten,

as I commented in the issue, it would be really helpful if you could
attach a testcase to reproduce the issue, in order to looking forward
to a possible fix.

Many thanks in advance!
-Simo

http://people.apache.org/~simonetripodi/
http://simonetripodi.livejournal.com/
http://twitter.com/simonetripodi
http://www.99soft.org/



On Wed, Mar 14, 2012 at 9:01 AM, Torsten Krah
<tk...@fachschaft.imn.htwk-leipzig.de> wrote:
> Ticket is: https://issues.apache.org/jira/browse/DIGESTER-163
>

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


Re: [digester3] - can DigesterLoader instance be shared?

Posted by Torsten Krah <tk...@fachschaft.imn.htwk-leipzig.de>.
Ticket is: https://issues.apache.org/jira/browse/DIGESTER-163


Re: [digester3] - can DigesterLoader instance be shared?

Posted by Torsten Krah <tk...@fachschaft.imn.htwk-leipzig.de>.
Am 13.03.2012 22:52, schrieb Simone Tripodi:
> Hi Torsten,
> yes, a configured loader instace can be shared across multiple
> components in the application, just create new Digester instance every
> time you have to perform a parse (or put them in a pool of digesters
> to save resources)

Good to know - so if i get a ConcurrentModificationException from the 
digester codebase, i'll found a bug and should open a ticket (will post 
the link at this thread here when reported).
Thought i did something wrong sharing my loader ;).

Torsten


>
> HTH,
> -Simo
>
> http://people.apache.org/~simonetripodi/
> http://simonetripodi.livejournal.com/
> http://twitter.com/simonetripodi
> http://www.99soft.org/
>
>
>
> On Tue, Mar 13, 2012 at 9:02 PM, Torsten Krah
> <tk...@fachschaft.imn.htwk-leipzig.de>  wrote:
>> Some addition:
>>
>> According to the employee servlet @
>> http://commons.apache.org/digester/guide/binder.html , it should be possible
>> to share a loader, shouldn't it?
>>



Re: [digester3] - can DigesterLoader instance be shared?

Posted by Simone Tripodi <si...@apache.org>.
Hi Torsten,
yes, a configured loader instace can be shared across multiple
components in the application, just create new Digester instance every
time you have to perform a parse (or put them in a pool of digesters
to save resources)

HTH,
-Simo

http://people.apache.org/~simonetripodi/
http://simonetripodi.livejournal.com/
http://twitter.com/simonetripodi
http://www.99soft.org/



On Tue, Mar 13, 2012 at 9:02 PM, Torsten Krah
<tk...@fachschaft.imn.htwk-leipzig.de> wrote:
> Some addition:
>
> According to the employee servlet @
> http://commons.apache.org/digester/guide/binder.html , it should be possible
> to share a loader, shouldn't it?
>

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


Re: [digester3] - can DigesterLoader instance be shared?

Posted by Torsten Krah <tk...@fachschaft.imn.htwk-leipzig.de>.
Some addition:

According to the employee servlet @ 
http://commons.apache.org/digester/guide/binder.html , it should be 
possible to share a loader, shouldn't it?