Hello,

I have a question regarding the usage of Castor in a multi-threaded,
high volume use scenario like explained in
http://www.castor.org/xml-best-practice.html#Performance-Considerations

We use Castor with a lot of mapping (XML) files - one for each class we
want to serialize.

In such a scenario, should I use
1) ONE XMLContext with all the mapping files added to it, or is it
better to
2) use another XMLContext with each mapping file?

As I read in other postings in the list (1) should be the prefered way,
but because it would be unconvenient to initialize XMLContext with all
possible mappings,
we use a lazy on-demand approach. So:

Is it safe to call XMLContext.addMapping() with the same mapping twice?

Will XMLContext then cache the mappings in calls to
XMLContext.addMapping() and return fast? 

Or should we cache used mappings ourselves and prevent another call to
XMLContext.addMapping()?


We noticed, that the overhead of initialization and setting mappings is
much
bigger than the actual (de)serialization work afterwards. So I'd like to
keep it as low as possible.

Thanks a lot,
Andreas Furtner


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to