Add debug output for prototype handling.
This commit is contained in:
parent
50ab484fd0
commit
d25b8298ee
1 changed files with 16 additions and 2 deletions
|
@ -197,12 +197,21 @@ public final class TypeManager {
|
|||
}
|
||||
}
|
||||
|
||||
boolean debug = "true".equalsIgnoreCase(app.getProperty("helma.debugTypeManager"));
|
||||
if (debug) {
|
||||
System.err.println("Starting CHECK loop in " + Thread.currentThread());
|
||||
}
|
||||
|
||||
// loop through prototypes and check if type.properties needs updates
|
||||
// it's important that we do this _after_ potentially new prototypes
|
||||
// have been created in the previous loop.
|
||||
for (Iterator i = prototypes.values().iterator(); i.hasNext();) {
|
||||
Prototype proto = (Prototype) i.next();
|
||||
|
||||
if (debug) {
|
||||
System.err.println("CHECK: " + proto.getName() + " in " + Thread.currentThread());
|
||||
}
|
||||
|
||||
// update prototype's type mapping
|
||||
DbMapping dbmap = proto.getDbMapping();
|
||||
|
||||
|
@ -216,6 +225,9 @@ public final class TypeManager {
|
|||
dbmap.update();
|
||||
}
|
||||
}
|
||||
if (debug) {
|
||||
System.err.println("Finished CHECK in " + Thread.currentThread());
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isValidTypeName(String str) {
|
||||
|
@ -285,11 +297,13 @@ public final class TypeManager {
|
|||
* @return the newly created prototype
|
||||
*/
|
||||
public synchronized Prototype createPrototype(String typename, Repository repository) {
|
||||
if ("true".equalsIgnoreCase(app.getProperty("helma.debugTypeManager"))) {
|
||||
System.err.println("CREATE: " + typename + " from " + repository + " in " + Thread.currentThread());
|
||||
// Thread.dumpStack();
|
||||
}
|
||||
Prototype proto = new Prototype(typename, repository, app);
|
||||
|
||||
// put the prototype into our map
|
||||
prototypes.put(proto.getLowerCaseName(), proto);
|
||||
|
||||
return proto;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue