Hi Patrick,
indeed, when ingesting XML documents you have to make sure the
Digester instance is not used in other running threads; sometimes
creating new BeanReader instances could require time, that's why I
suggested you using a Pool of BeanReader.
Sure, paste your code on pastie.org or similar (i
Hi again,
>From what I found on the web, it's not safe to reuse the same instance of a
Digester between different threads.
But what I'm currently doing is creating a new instance of BeanReader (which
extends the Digester class) for every call, which means that I shouldn't
have any multithreading is
Hi Patrick,
sorry for the misunderstanding I made, for deserializer I meant the
BeanReader :P
Sorry again, have a nice day!
Simo
http://people.apache.org/~simonetripodi/
http://www.99soft.org/
On Mon, Aug 15, 2011 at 9:57 AM, patrick daures
wrote:
> Hi,
> I have another question to ask you, yo
Hi,
I have another question to ask you, you said "get/release a deserializer for
each request".
For the moment, I don't use any deserializer, I only use BeanReader and
BeanWriter objects.
What I do is create a new instance of one of this object every time I need
to serialize / unserialize data.
Cou
Hi Patrick!
you're welcome, let us know about your results!
Have nice day,
Simo
http://people.apache.org/~simonetripodi/
http://www.99soft.org/
On Sun, Aug 14, 2011 at 8:54 PM, Patrick Daures
wrote:
> Ok, thank you very much for your advice.
> I will take the 3rd solution
>
> Patrick
>
> Le 1
Ok, thank you very much for your advice.
I will take the 3rd solution
Patrick
Le 14 août 2011 à 20:24, Simone Tripodi a écrit :
> Hi Patrick!!!
> for the XML -> Object mapping, Betwixt relies on Digester, which is
> NOT thread safe.
> You have 3 options:
>
> - synchronize the blocks as you did
Hi Patrick!!!
for the XML -> Object mapping, Betwixt relies on Digester, which is
NOT thread safe.
You have 3 options:
- synchronize the blocks as you did - anyway it's not the best way IMHO;
- re-create the deserializer for each request;
- use Betwixt in combination with commons-pool, get/rele
Hi, i'm currently using betwixt in produit to serialize and unserialize
objects in XML. Each thread is using a new instance of beanreader to
unserialize XML. I had a problem with my application, i added a synchronized
around the call to the betwixt lib and everything went fine. Maybe the
problem co