copy to h3

Fix for [HER-1612] lock contention in BeanShellDecideRule/BeanShellProcessor occurs even if isolate-threads=true
* BeanShellDecideRule.java
    (getInterpreter) add synchronization
    (decisionFor) remove method synchronization; sync on interpreter/getInterpreter makes it a superfluous bottleneck
* BeanShellProcessor.java
    (getInterpreter) add synchronization
    (innerProcess) remove method synchronization; sync on interpreter/getInterpreter makes it a superfluous bottleneck
This commit is contained in:
gojomo
2009-05-14 22:27:10 +00:00
parent dc117fb958
commit dccf2becae
2 changed files with 4 additions and 4 deletions
@@ -110,7 +110,7 @@ public class BeanShellProcessor extends Processor {
}
@Override
protected synchronized void innerProcess(ProcessorURI curi) {
protected void innerProcess(ProcessorURI curi) {
// depending on previous configuration, interpreter may
// be local to this thread or shared
Interpreter interpreter = getInterpreter();
@@ -131,7 +131,7 @@ public class BeanShellProcessor extends Processor {
* to this thread.
* @return Interpreter to use
*/
protected Interpreter getInterpreter() {
protected synchronized Interpreter getInterpreter() {
if(sharedInterpreter==null
&& getIsolateThreads()) {
// initialize
@@ -104,7 +104,7 @@ implements ApplicationContextAware {
}
@Override
public synchronized DecideResult innerDecide(ProcessorURI uri) {
public DecideResult innerDecide(ProcessorURI uri) {
// depending on previous configuration, interpreter may
// be local to this thread or shared
Interpreter interpreter = getInterpreter();
@@ -127,7 +127,7 @@ implements ApplicationContextAware {
* to this thread.
* @return Interpreter to use
*/
protected Interpreter getInterpreter() {
protected synchronized Interpreter getInterpreter() {
if(sharedInterpreter==null
&& getIsolateThreads()) {
// initialize