Re: Cayenne 3.0M4 ignoring extended data types

From: Chris Gamache (cgamach..mail.com)
Date: Mon Aug 04 2008 - 15:14:24 EDT

  • Next message: Andrus Adamchik: "Re: Cayenne 3.0M4 ignoring extended data types"

    On Fri, Aug 1, 2008 at 5:23 PM, Andrus Adamchik <andru..bjectstyle.org>wrote:

    > This code looks suspect. I am not sure that after it is run, dc ==
    > Configuration.getSharedConfiguration(). Can you do something like this
    > instead:
    >
    > DefaultConfiguration dc = new DefaultConfiguration(configuration);
    > dc.addClassPath(classPath);
    > Configuration.initializeSharedConfiguration(dc);
    >
    That wipes my shared configuration each time a new library tries to
    instantiate Cayenne. I need to add to the already initialized Cayenne if
    Cayenne has been initialized, and the only way to determine if Cayenne has
    already been initialized (at least that I have found...) is to try to obtain
    the shared configuration first. If it hasn't been initialized then an
    exception is thrown and we branch to the initialization routines.

    This is important when library X uses Cayenne data classes mapped in both
    library Y and library Z. We can't have Z re-initalizing Cayenne after Y has
    already initialized and registered its mapped classes.

    Is there a better way to accomplish this task?
    Also, this doesn't address the issue of ExtendedTypes being ignored for
    elements retrieved using a relational fetch in 3.0M4...



    This archive was generated by hypermail 2.0.0 : Mon Aug 04 2008 - 15:15:01 EDT