[jdom-interest] Reusable JDOM Elements

Martin Schulz schulz at videotron.ca
Sun Nov 10 17:45:03 PST 2002


Hi,

in a potentially busy server environment, I preconstruct and cache
potentially many JDOM
subtrees. Comes usage time, the subtree gets cloned and attached to a
real Document, which is subsequently output to XML and
sent out.

It appears wasteful to have to clone the Elements, even if they are not
going to be changed, for the sole reason
that they maintain a reference to their parent.  It seems also to be
slightly convoluted to manage recycling of such subtrees.

Is there a good pattern or solution out there (JDOM or closely related)
which allows me to build Document trees, which are only top-to-bottom
connected or which allows to reuse the constant subtree(s) easily?

Thanks!

	Martin


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.385 / Virus Database: 217 - Release Date: 04/09/2002
 




More information about the jdom-interest mailing list