Hi Paul,

As you know, the built-in marshal/unmarshal methods on generated source,
call a static method on either the Marshaller or Unmarshaller. The
static method will create a new instance of the Marshaller or
Unmarshaller and use that for handling the actual
marshalling/unmarshalling.

So, instantiating these classes yourself will cause no additional
overhead. 

As for Thread-safety, we've tried to make them thread-safe and we're not
aware of any open thread-safety issues with those classes, but to be on
the safe side you may want to use separate Marshaller and Unmarshaller
for each thread.

--Keith


> Paul Grillo wrote:
> 
> Using source generator i am able to generate the classes using
> nomarshall switch.  For reasons that i won't get into, it is a little
> more convenient for me to not have the builtin unmarshal methods This
> relates to finding the appropriate static unmarshal method in the
> correct class etc.
> 
> My question is this.
> 
> Is there any difference between calling the marshal/unmarshal methods
> as part of the generated classes, verses, using Unmarshaller
> and Marshaller classes independently and passing the input stream and
> Class?
> 
> Any performance hit for instantiating the above objects?  Threading
> issues?
> 
> I do not use a mapping file, nor do i need one.  I simply instantiate
> the above to classes as appropriate and pass either an object to
> marshal, or a reader and class to unmarshal.
> 
> thanks for any input.
> 
>

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to