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 - anyway it's not the best way IMHO; > - re-create the deserializer for each request; > - use Betwixt in combination with commons-pool, get/release a > deserializer for each request (same pattern you would do with JDBC > Connection in a DataSource). > > My preferred is the #3, but it's just a matter of tastes ;) > Have a nice day, all the best!!! > Simo > > http://people.apache.org/~simonetripodi/ > http://www.99soft.org/ > > > > On Sat, Aug 13, 2011 at 8:31 PM, patrick daures > <patrick.dau...@gmail.com> wrote: >> 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 comes from my app, but i wanted to be sure the lib is thread safe. >> Thanks. >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@commons.apache.org > For additional commands, e-mail: user-h...@commons.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org