Fixed getChildElement("api") and corrected the output of various thread/evaluator
counter methods.
This commit is contained in:
parent
41c9ff1670
commit
d19d094409
1 changed files with 5 additions and 5 deletions
|
@ -1217,8 +1217,8 @@ public final class Application implements IPathElement, Runnable {
|
||||||
// we use the classes from helma.doc-pacakge for introspection.
|
// we use the classes from helma.doc-pacakge for introspection.
|
||||||
// the first time an url like /appname/api/ is parsed, the application is read again
|
// the first time an url like /appname/api/ is parsed, the application is read again
|
||||||
// parsed for comments and exposed as an IPathElement
|
// parsed for comments and exposed as an IPathElement
|
||||||
if (name.equals("api")) {
|
if (name.equals("api") && allThreads.size() > 0) {
|
||||||
return getCurrentRequestEvaluator().scriptingEngine.getIntrospector();
|
return ((RequestEvaluator) allThreads.get(0)).scriptingEngine.getIntrospector();
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
@ -1644,14 +1644,14 @@ public final class Application implements IPathElement, Runnable {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public int countThreads() {
|
public int countThreads() {
|
||||||
return threadgroup.activeCount() - 1;
|
return threadgroup.activeCount();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public int countEvaluators() {
|
public int countEvaluators() {
|
||||||
return allThreads.size() - 1;
|
return allThreads.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1665,7 +1665,7 @@ public final class Application implements IPathElement, Runnable {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public int countActiveEvaluators() {
|
public int countActiveEvaluators() {
|
||||||
return allThreads.size() - freeThreads.size() - 1;
|
return allThreads.size() - freeThreads.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue