Re: Cayenne XML Names

From: Michael Gentry (blacknex..mail.com)
Date: Wed Dec 19 2007 - 11:29:14 EST

  • Next message: Andrus Adamchik: "Re: Cayenne XML Names"

    I'll have to think about that when I have more spare cycles. I'm not
    sure this will help you, but in a previous project I had:

    environments/local/MyDataNode.driver.xml

    (and also "development", "testing", "acceptance", and "production"
    under "environments")

    My ant build.xml would pull in and replace the DataNode XML with the
    one for the appropriate environment I was building before creating the
    JAR.

    /dev/mrg

    On Dec 19, 2007 10:07 AM, Kevin Menard <kmenar..ervprise.com> wrote:
    > My only real criticism is that I would need to keep two .cayenne folders
    > around if I understand your proposal.
    >
    > E.g., I have a "models" JAR that contains both my server and client classes.
    > Packaged in the JAR is the cayenne.xml and data map. I don't package the
    > domain node at this stage because I want the JAR to be usable by other
    > projects that can specify their own connection info. So, the trio of files
    > is actually split over different JARs and the class loader just happens to
    > pick them all up.
    >
    > One sort of a pain in the neck part is that every time I load my project
    > into the modeler, a new domain node file is auto-generated that I have to
    > remove from the project so that it doesn't get packaged with the JAR.
    >
    > How would your proposal work for that sort of situation?
    >
    > --
    > Kevin
    >
    >
    >
    > On 12/19/07 9:31 AM, "Michael Gentry" <blacknex..mail.com> wrote:
    >
    > > I know I've brought this up before, but I don't believe we really
    > > decided on anything (or did anything), so here goes again ...
    > >
    > > What do you think about changing the default behavior of Cayenne and
    > > the Modeler to look for directory wrappers for the Cayenne XML files
    > > instead of looking for cayenne.xml? Here are the changes and
    > > advantages as I see them:
    > >
    > > * Have Cayenne Modeler save the XML files (cayenne.xml, etc) into a
    > > Cayenne wrapper directory of your naming, such as MyModel.cayenne (it
    > > would append the .cayenne, which is the wrapper signature). You could
    > > also have MyOtherModel.cayenne in the same directory.
    > >
    > > * Have Cayenne resolve all *.cayenne wrappers at the root of the
    > > CLASSPATH upon startup. This will make it easier to support multiple
    > > models and also utilize models in other frameworks. For legacy
    > > support, also look for cayenne.xml if no *.cayenne wrappers are found.
    > > (I suppose it could also add cayenne.xml regardless of if *.cayenne
    > > wrappers are found.) It might seem like a performance hit to look for
    > > all *.cayenne, but most things at the root of the CLASSPATH are
    > > directories like "org" or "com", so it seems to me the scanning would
    > > be minimal.
    > >
    > > * The *.cayenne wrapper directories could be "branded" with a Cayenne
    > > logo (at least on OS X, not 100% sure about other OS's).
    > >
    > > * The *.cayenne wrapper can be double-clicked to launch Cayenne
    > > Modeler (again, on OS X, hopefully on other OS's too).
    > >
    > > * It is easier to copy a model around in a GUI (drag and drop one
    > > "file") instead of select multiple files.
    > >
    > >
    > > There might be other advantages, too. Those are just the ones off the
    > > top of my head. I can't think of any real negatives to this, either,
    > > but feedback is greatly appreciated.
    > >
    > > Thanks,
    > >
    > > /dev/mrg
    >
    >



    This archive was generated by hypermail 2.0.0 : Wed Dec 19 2007 - 11:29:50 EST