> You can set your own factories on Castor. Have a look at
>
> http://jira.codehaus.org/browse/CASTOR-1669
>
> for a recent conversation on setting custom object factories on the
> Unmarshaller.
>
> Werner
>

Thanks for the, as always, speedy response!

While this looks like it will do what I want (will see if I can actually
get it to work tomorrow ;), I'd think this to be common enough to warrant
something like a factory-method attribute on the classdef, much like the
similar facility in Spring. Eg for static methods:

<bean id="myBean" class="org.foo.MyBean" factory-method="createInstance"/>
As well as the ability to specify a separate factory-class.

By the way, what's the behaviour when Castor encounters an xsi:type
declaration? I assume the ObjectFactory is called with the actual impl
type in that case, rather than with name/type specified in the
class-element of the mapping?



--
Regards,
Audun


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

    http://xircles.codehaus.org/manage_email

Reply via email to