This content has been marked as final. Show 2 replies
Is there a way with XB to return a different type, depending on the XML data? As in, instead of just Person, have an interface Person, but concrete classes of GreenPerson and PurplePerson?
Actually, looking at it, it seems one could do that based on the Attributes, but what if you need to decide later on down the line?
What I'd like to do is use (from admin-console) the org\jboss\admin\model\datasource\DataSource and its concrete classes and return a ConnectionPool or NoTxDataSource, etc depending on what the XML says. Is there a way to decide the type of object after the first line of XML? If you have an example let me know, I checked the testsuite examples and didn't see anything that jumped out at me.