Hi Steve
Thanks for the reply. I used log4j for quite some time now, and I understand that you can specify the location of the config file. But I don't want to write the unnecessary code that will initialize log4j when hibernate is allready doing that.
But, as I allready mentioned, hibernate will initialize the log4j only if it finds the config file under the "root" of the class package (according to the tests I did).
So the following wont work:
/org/company/package1/*.class
/org/company/package2/*.class
/org/company/hibernate/hibernate.cfg.xml
/org/company/hibernate/oscache.properties
/org/company/hibernate/log4j.xml
untill I move log4j.xml under / as in
/log4j.xml
Furthermore, the cache config file will work fine also being in any (sub) package...
I hope this clarifies my problem.
Z...
steve wrote:
Quote:
which contradicts with documentation (it says it just has to be in the classpath)
Um thats the general definition of "in the classpath".
And it does not *have* to be in the classpath. Have you taken a look at the log4j documentation? Oddly enough it describes configuring log4j ;)
The other stuff is completely superfluous as they all relate to caches. Simply plugin a custom CacheProvider which reads the configuration file from where ever you want.