On Fri, Aug 1, 2008 at 5:23 PM, Andrus Adamchik <[EMAIL PROTECTED]>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...
