Win a copy of Practice Tests for OCP Java 17 Certification Exam (1Z0-829) this week in the OCPJP forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Scott Selikoff
Bartenders:
  • Piet Souris
  • Jj Roberts
  • fred rosenberger

Specify superclass for Java Objects generated from XSD using castor

 
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The casterbuilder.properties file has an option for you to specify a superclass for all java objects generated from castor. However, the properties file are included in the caster-xml.jar file. Is there anyway I could overwrite the parameter/value when perform the data binding?

Thanks!
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Is there anyway I could overwrite the parameter/value when perform the data binding?



Have a properties file called castor.properties in your ${JAVA_HOME}/lib or working directory (from where you are calling Castor) and properties in this file will override those which are defined in the jar file.

The entries from the file in your working directory have the highest preference and the one in the jar the lowest.

Another workaround: Get the source files of Castor from the distribution or CVS and change the values in the properties file. Though this dosen't look neat!
 
reply
    Bookmark Topic Watch Topic
  • New Topic