java - Regarding JAXB unmarshalling for inherited classes -
regarding 1 of classic problems jaxb marshalling when dealing marshalling/unmarshalling inherited classes. usual solutions either use @xmlseealso or create child class context using jaxbcontext.newinstance(child.class). in our case dealing plugin-type architecture (java serviceloader) wherein not know plugin loaded @ runtime plugin's request messages extend common requestmessage class , response messages responsemessage class. not feasible use either of @xmlseealso or new context option in case tie plugin being created , attached.
are there other alternatives using jaxb itself? or have use other jaxb alternatives xstream?
thanks,
paddy
if plugins available before create jaxb context, use class path scanning discover classes directly or indirectly extend requestmessage , automatically include them in class list.
Comments
Post a Comment