No, the same thread may recursively enter the this synchronize multiple times.2. It has its LogPluginInfo (stolen from PluginInfo - but withoutWhat about keeping our PluginInfo, remove all unnecessary logs and only
logging).
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?
And as 'creatingInstance' is true the second time, it will return 'null'
as logging handle - which you check in PluginInfo and probably ignore the
log.warn (or do a System.err.out()).
[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
