Hi Werner,

We worked on it since my last email.
So the problem is the Map  _xmlNameMap in class
XMLClassDescriptorResolverImpl that is not accessed in a safe thread way.
We were unable to write a test program but we always had the problem on our
business program: it make many heavy marshalling.

We discovered that your Revision 8186 : Added thread safety-ness to
XMLClassDescriptorResolverImpl.DescriptorCacheImpl (CASTOR-2019)* fix our
problem*.

This CASTOR-2019 task is pending, so my question is: do you have something
to complete to close it?
And when do you plan to release 1.3.1?

Thank you very much.



2009/11/13 Werner Guttmann <[email protected]>

> Hi Sebastian,
>
> Sebastien Devolder wrote:
> > Hi,
> >
> > I have a bug on a program running on IBM platform: AIX + IBM J9 VM (build
> > 2.4) + Castor 1.3
> >
> > Unfortunately, I cannot repeat the problem on my development workstation:
> > Windows XP + sun jdk1.6 + Castor 1.3.
> >
> >
> > 1. As you can see in my my program below I use one instance (singleton)
> of
> > XMLContext. But it's thread safe, right?
> > 2. Each call of CastorTools.marshall(Object element) instanciate a new
> > Marshaller object, right?
> That approach looks perfectly fine to me, except that I cannot really
> comment on your ParametrableXMLContext() class.
>
> > BUT when I call the method CastorTools.marshall(Object) in many
> > simultanously launched threads, sometimes, my program locks.
> > In the dump file, I can see that all my threads are in "waiting on
> > condition" state on findNonNullKeyEntry  (you have java stack at the end
> of
> > mail)
> Can you please raise a Jira issue [1] here and attach the stack 'trace',
> and we'll have a look.
>
>
> > Someone can see what I have done wrong?
> > This is my first email here, I hope I have done it right.
> Yes, I guess you provided us with all required informations.
>
> Regards
> Werner
>
> [1] http://jira.codehaus.org/browse/CASTOR
>
> > Thank you very much.
> >
> >
> ___________________________________________________________________________________________
> > *Here is the piece of my code involved in my problem:*
> >
> > public class CastorTools {
> >
> >     private static final XMLContext xmlContext = new
> > ParametrableXMLContext();
> >
> >     public static String marshall(Object element) throws CastorException
> {
> >
> >         StringWriter writer = new StringWriter();
> >
> >         Marshaller marshaller = xmlContext.createMarshaller();
> >         marshaller.setWriter(writer);
> >         marshaller.setMarshalAsDocument(false);
> >         marshaller.setValidation(false);
> >         marshaller.setSuppressNamespaces(true);
> >         marshaller.marshal(element);
> >
> >         return writer.toString();
> >     }
> >     [...]
> >
> >
> ___________________________________________________________________________________________
> > *Here is the java stack of one of my threads in the dump file:*
> >
> > at java/util/HashMap.findNonNullKeyEntry(HashMap.java:526(Compiled Code))
> > at java/util/HashMap.getEntry(HashMap.java:511(Compiled Code))
> > at java/util/HashMap.get(HashMap.java:497(Compiled Code))
> > at
> >
> org/exolab/castor/xml/util/XMLClassDescriptorResolverImpl$DescriptorCacheImpl.getDescriptorList(XMLClassDescriptorResolverImpl.java:563)
> >
> > at
> >
> org/exolab/castor/xml/util/XMLClassDescriptorResolverImpl$DescriptorCacheImpl.addDescriptor(XMLClassDescriptorResolverImpl.java:523)
> >
> > at
> >
> org/exolab/castor/xml/util/XMLClassDescriptorResolverImpl$DescriptorCacheImpl.addAllDescriptors(XMLClassDescriptorResolverImpl.java:632)
> >
> > at
> >
> org/exolab/castor/xml/util/resolvers/CastorXMLStrategy.getDescriptor(CastorXMLStrategy.java:131)
> >
> > at
> >
> org/exolab/castor/xml/util/resolvers/CastorXMLStrategy.resolveClass(CastorXMLStrategy.java:82)
> >
> > at
> >
> org/exolab/castor/xml/util/XMLClassDescriptorResolverImpl.resolve(XMLClassDescriptorResolverImpl.java:289)
> >
> > at
> >
> org/exolab/castor/xml/util/XMLClassDescriptorResolverImpl.resolve(XMLClassDescriptorResolverImpl.java:232)
> >
> > at
> org/exolab/castor/xml/Marshaller.getClassDescriptor(Marshaller.java:2483)
> >
> > at org/exolab/castor/xml/Marshaller.marshal(Marshaller.java:1156)
> > at org/exolab/castor/xml/Marshaller.marshal(Marshaller.java:1997)
> > at org/exolab/castor/xml/Marshaller.marshal(Marshaller.java:2004)
> > at org/exolab/castor/xml/Marshaller.marshal(Marshaller.java:2004)
> > at org/exolab/castor/xml/Marshaller.marshal(Marshaller.java:2004)
> > at org/exolab/castor/xml/Marshaller.marshal(Marshaller.java:921)
> > at com/netfinca/common/castor/CastorTools.marshall(CastorTools.java:58)
> >
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>

Reply via email to