users@jersey.java.net

Re: [Jersey] Thread safety of XML-based factories <was> Re: [Jersey] Fixed <was> Re: [Jersey] Jersey vulnerable to XXE attack?

From: Martin Probst <mail_at_martin-probst.com>
Date: Mon, 13 Jul 2009 15:15:14 +0200

> Given we are close to releasing i have taken the conservative step of
> creating and storing factories in thread locals.

Why do you bother with caching them anyways?

If it's for performance reasons, I would suggest to implement the
simple solution (new factory on every request), then measure, and then
maybe do something about it. As far as I can see there is nothing
expensive at least in DocumentBuilderFactory.

Martin