Hi,
before looking into the source code, maybe someone can help me understand
the order of search paths when adding a classpath like this
DefaultConfiguration conf = new
DefaultConfiguration();
conf.addClassPath("database");
Configuration.initializeSharedConfiguration(conf);
the log spits out
[2010/11/18 11:01:03.348] DEBUG [conf.DefaultConfiguration:<init>]: using
domain file name: cayenne.xml
[2010/11/18 11:01:03.350] DEBUG [conf.DefaultConfiguration:initialize]:
initialize starting.
[2010/11/18 11:01:03.351] DEBUG [util.ResourceLocator:findResource]:
searching additional classpaths: [database]
[2010/11/18 11:01:03.351] DEBUG [util.ResourceLocator:findResource]:
searching for: database/cayenne.xml
[2010/11/18 11:01:03.352] DEBUG [mortbay.log:debug]:
getResource(database/cayenne.xml)=file:/C:/Users/borutb/workspace/maps-manager/target/classes/database/cayenne.xml
[2010/11/18 11:01:03.352] DEBUG [util.ResourceLocator:findURLInClassLoader]:
URL found with classloader:
file:/C:/Users/borutb/workspace/maps-manager/target/classes/database/cayenne.xml
So, if I do
conf.addClassPath("database");
is Cayenne also trying to load cayenne.xml from the root classpath or not?
The log says: "searching additional classpths..."
I am asking this because I have a JAR which my web project depends on and
this jar has cayenne.xml also (at the root). I just wanna be sure if the
order is deterministic and if the root is searched at all in the above case.
If not, I suggest log improvement and the documentation at
http://cayenne.apache.org/doc30/customizing-configuration.html which doesn't
clarify my case.
Thanks,
Borut
This archive was generated by hypermail 2.0.0 : Thu Nov 18 2010 - 10:22:22 UTC