Audun,
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Donnerstag, 21. Dezember 2006 16:56
> To: [email protected]
> Subject: RE: [castor-user] Create instance with factory-method
>
> > 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"/>
Thinking about this, why not .. ;-). It should not be too hard, ignoring
the usual problematic cases for the time being. Can you please raise a
feature request at http://jira.codehaus.org/browse/CASTOR, and attach
the relevant parts of this conversation. Now, if you attached the idea
of a patch, such a pre-xMas present would definitely be appreciated ..
;-).
> As well as the ability to specify a separate factory-class.
Hmm, not sure about this ....
> 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?
Not sure either. Will try to follow up later on .....
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email