Re: FileConfiguration issue

From: Holger Hoffstätte (holge..izards.de)
Date: Tue Mar 25 2003 - 11:34:29 EST

  • Next message: Holger Hoffstätte: "Re: FileConfiguration issue"

    Holger Hoffstätte wrote:
    > > However, it doesn't work, as DefaultConfiguration.getDomainConfiguration
    > > tries to read DEFAULT_DOMAIN_FILE (cayenne.xml). DefaultConfiguraiton
    >
    > That's OK, because all Configuration subclasses now consistently use the
    > ResourceLocator and therefore all the default implementation of
    > getDomainConfiguration() has to do is use it. :)

    Nonsense, Holger! :-)

    Actually all this only worked correctly for the new FileConfiguration
    because a domain file could only be called "cayenne.xml"..until now. While
    I was fixing ResourceLocator for relative paths I also went the extra mile
    and enabled file names other than the default. This now works on the
    classpath: DefaultConfiguration("test-cayenne.xml") as well as in the
    filesystem, both with absolute and relative paths: new
    FileConfiguration("my/subdir/test.cayenne.xml").
    Default when unspecified is still "cayenne.xml". Loading & saving such
    renamed domain files in Modeler works fine, saving new projects still
    creates the default file name. 'Save As' might come later.

    If this was somehow a bad idea please let me know so that I can roll back.

    Holger



    This archive was generated by hypermail 2.0.0 : Tue Mar 25 2003 - 11:38:59 EST