No, the same thread may recursively enter the this synchronize multiple times.
2. It has its LogPluginInfo (stolen from PluginInfo - but without logging).
What about keeping our PluginInfo, remove all unnecessary logs and only keep the single log.warn().
In Global.java you do something like this:
public LogChannel getLog(String key) {
I_Logger logger = hash.get(key);
if (logger == null) {
synchronized (this) {
if (logger == null) {
if (creatingInstance) return null; // !!!!
creatingInstance = true;
// call plugin ....
// this.logger = plugin.load()
creatingInstance = false;
}
}
}
Would this really work? Say this happens glob.init->getLog()->getFactory().new PluginInfo->getLog()
Would it not deadlock?
[snip]
What do you say? Is it usable, acceptable, commitable?
Michele and i just discussed it. We are thankful if you donate this to xmlBlaster.org.
Thanks! I take another round tomorrow. Clean some stuff up and documenting it: then commit ;-)
Ah, yes, don't forget a requirement XML :-)
thanks
Marcel
And thanks for your allways good input.
//Peter