I want to use advanced field handlers with Castor to pull in objects
that are not defined in XML, but exist in a database. I'd like some
feedback from any Castor XML developers as to whether or not this should
be possible in the current code.
What I essentially want to do is:
a) Marshal or unmarshal file from XML.
b) For particular fields, I want to use a custom FieldHandler. The
fields in XML will be Strings but in the constructed objects they will
be an object (similar to a Castor reference, but the reference is to
something not in XML)
c) I need to inject a Data Access Object (in order to use cross-field
handler transactions) into the field handler. Therefore I can't have
Castor construct it. I will have to use a FieldHandlerFactory,
construct my FieldHandler and inject the custom FieldHandler with my
DAO instance.
d) When the object is unmarshaled, I want to retrieve the object
represented by that reference from the DB using my DAO and set it in my
object.
e) When the object is marshalled, I want to return the proper reference
String in place of the object.
Should this work? Will I run into any problems? Are there any
alternative ideas for what I want to accomplish? Will it make a
difference whether I use the release or CVS version of Castor for my
purposes?
Thanks,
Jeremy
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev