What is the advantage of dynamically generating java bean classes from xml?

I have written many java bean classes using my IDE. Another person offers a different approach. It assumes that I put an xml file with bean definitions in them. Then I either use jaxb or xslt to dynamically create classes at build time. Although this is a new and interesting approach, I do not see much benefit in this.

In this proposed approach, I see only one advantage: java bean classes should not be supported in configuration management. Any changes to the bean require only an update in the XML file.

Are there any significant benefits to dynamically creating Java classes? Is there any other reason why this approach is used?

+3
source share
2 answers

Jibx . .

  • java bean. . ( ) . .

  • bean .

  • , factory, . , .

  • ( , , Jibx) ENUMS, .

  • , , . CopyOnWrite, ArrayList , , List, Observer.

( , , 150 ) . , , bean, - ( ) , XSD . , , . .

. - . beans, .

+1

@Akhilss. Java EE, .

. beans , XML ( ). , XML.

, , XML, WSDL WSAP- SOAP, , beans. factory .

, EJB3 , beans XML . . .

- beans, . Apache Tuscany SDO beans XML. , , , , bean ( ), . , .

, KISS. , . XML , . , , .

+2

All Articles