Hi Stewart,

This looks like a clear enhancement request to me, can you create it on
our JIRA site and I'll take a look.

http://jira.codehaus.org/browse/CASTOR

Cheers,

Andrew.

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
Sent: 04 August 2005 19:32
To: [email protected]
Subject: [castor-user] Castor XML thread safe



Hi All,

I have a new Marshaller object for each occasion of writing an XML file,
having found through various google and codehaus searches that the
Marshaller/Unmarshallers are not thread safe.

However, I was looking to use a singleton
org.exolab.castor.mapping.Mapping instance from which to set my
Marshaller, and I found a class:

org.apache.jetspeed.util.SynchronizedMapping

With the description:

public class SynchronizedMapping
extends org.exolab.castor.mapping.Mapping
Thread safe wrapper for the castor Mapping class.
This wrapper serializes all thread access to the loadMapping() methods. 

At:
http://portals.apache.org/jetspeed-1/apidocs/org/apache/jetspeed/util/Sy
nchronizedMapping.html

It sounds useful, but it seems excessive to download the whole of
JetSpeed just for that one class. Is there any communication between
Castor and Apache on this subject? Will a SynchronizedMapping class be
available in future Castor downloads? It seems to have a pretty generic
utility value. Meanwhile, I guess I should stick with

synchronized(mapping)
{
  marshaller.setMapping(mapping);
}

I guess...


Thanks

Stewart

-------------------------------------------------
If you wish to unsubscribe from this list, please 
send an empty message to the following address:

[EMAIL PROTECTED]
-------------------------------------------------




CODA has a new world-class consolidation package.
Find out more about www.coda.com/ocra <http://www.coda.com/ocra> 


The information in this message is confidential and may be legally privileged. 
It may not be disclosed to, or used by, anyone other than the addressee. If you 
receive this message in error, please advise us immediately.  Internet emails 
are not necessarily secure. CODA does not accept responsibility for changes to 
any email which occur after the email has been sent. Attachments to this email 
may contain software viruses, which could damage your systems. CODA has checked 
the attachments for viruses before sending, but you should virus-check them 
before opening.  


-------------------------------------------------
If you wish to unsubscribe from this list, please
send an empty message to the following address:

[EMAIL PROTECTED]
-------------------------------------------------

Reply via email to