Hi,
I've just integrated Castor 0.9.6 in my application, and I have the same pb
as Conny.
I'm using two distinct database accesses (2 databaseFileConfig, 2 database
names).
But when I try to initialize the JDO objects like this:
JDO2.loadConfiguration(databaseFileConfig1,loader);
JDO2 jdo1 = JDO2.createInstance(nomDatabase1);
JDO2.loadConfiguration(databaseFileConfig2,loader);
JDO2 jdo2 = JDO2.createInstance(nomDatabase2);
I've have an exception on the second loadConfiguration.
In fact, after looking for the problem, I have to call
JDOConfLoader.deleteConfiguration();
To reset private static boolean _loaded to false, before calling the new
JDO2.loadConfiguration(..).
But is this ok, or may I have other pb later in my transactions ?
I have the same pb using the old JDO object (getDatabase() is calling
loadConfiguration(..)) :
JDO jdo1 = new JDO();
Jdo1.setClassLoader(loader); Jdo1.setDatabaseName(nomDatabase1);
Jdo1.setConfiguration(databaseFileConfig1);
Database db1 = jdo1.getDatabase();
JDO jdo2 = new JDO();
Jdo2.setClassLoader(loader); Jdo2.setDatabaseName(nomDatabase2);
Jdo2.setConfiguration(databaseFileConfig2);
Database db2 = jdo2.getDatabase();
Thanks for your help.
Sylvie
___________________
CREDI RA
Sylvie Palluel
[EMAIL PROTECTED]
___________________
> -----Message d'origine-----
> De�: Werner Guttmann [mailto:[EMAIL PROTECTED]
> Envoy�: mercredi 16 f�vrier 2005 20:39
> ��: [email protected]
> Objet�: Re: [castor-dev] Configuration file loading problem
>
> Conny,
>
> there's an open bug out there that more or less addresses your problem
> (and I honestly cannot remember its bug number right now). Unfortunately,
> the
> patch provided with this but report contains a couple of gotchas that made
> it impossible for us to commit it in time for this release.
>
> Regards
> Werner
>
> On Wed, 16 Feb 2005 16:11:51 +0100, Krey�el, Conny wrote:
>
> >Bug or feature?
> >
> >Today I tested the Castor 0.9.6 release and I see a big change in this
> release.
> >
> >Now I could not load more than one configuration, I must configure all
> database entries in one file!
> >
> >The problematic section is in JDOConfLoader.java::loadConfiguration
> (InputSource source, EntityResolver resolver).
> >
> >If I have loaded the first configuration file _loaded is true and later
> loaded files fails.
> >
> >Any comments?
> >
> >Conny
> >
> >
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev