cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <and...@objectstyle.org>
Subject Re: Cayenne 3.0M4 ignoring extended data types
Date Fri, 01 Aug 2008 21:23:07 GMT
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);

Andrus

On Jul 31, 2008, at 1:13 PM, Chris Gamache wrote:

>  if (!initialized) {
>   DefaultConfiguration dc = new DefaultConfiguration(configuration);
>   dc.addClassPath(classPath);
>   boolean cayenneNotInitialized = false;
>   try {
>    Configuration conf = Configuration.getSharedConfiguration();
>   } catch (Exception e) {
>    cayenneNotInitialized = true;
>   }
>
>   if (cayenneNotInitialized) {
>    dc.initializeSharedConfiguration(dc);
>   } else {
>    try{
>     dc.initialize();
>    }catch(Exception e){
>     throw new ConfigurationException();
>    }
>   }


Mime
View raw message