Hi,
d33mb33 wrote:
> Hello All
>
> I have invested time in getting Castor working to my satisfaction and the
> flexibility in the mappings have allowed me to generate xml that adheres to
> some difficult schemas. Thank you.
>
> I have two questions where I haven't found any information to help me. It
> may be that I haven't looked properly so simply pointing me in the right
> direction would be appreciated.
>
> 1. Some of my objects are marshalled into a database text field and then
> retrieved later through web services. At the moment I am using Castor to
> unmarshall and then re-marshall them. This is a waste of CPU and time,
> especially when the XML is a couple of megabytes. Can I write a field
> handler to simply return the XML? I have experimented and the best I have
> been able to do is get it out in a CDATA field.
Sorry, but somehow I am not sure I understand what the problem is. Can
you just rephrase your issue ?
> 2. Some of my objects contain synchronised collections which may be being
> updated by other threads during marshalling. When Castor iterates through
> these collections a ConcurrentModificationException is thrown. I am working
> around this issue by creating a "safe" copy of the collection but again this
> isn't ideal. Is there a recommended way to handle this?
Not really. Castor XML is not really thread-safe, and is not meant to
be. But out of cusiosity, what is it you are trying to achieve. Or
rather, why do you have a need to update those object instances you are
about to marshal ?
> I'm happy to provide clarifications if anything is unclear.
>
> Thanks in advance
>
> Dave
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email