Don't destroy interpreter on note memove or change bindings when interpreter.option.perNoteSession is false

This commit is contained in:
Lee moon soo 2016-02-07 08:12:43 +09:00
parent fc9cb3f4b5
commit 366b651943
2 changed files with 5 additions and 2 deletions

View file

@ -119,10 +119,10 @@ public class RemoteInterpreterTest {
assertEquals(0, process.getNumIdleClient());
assertEquals(0, process.referenceCount());
intpA.open();
intpA.open(); // initializa all interpreters in the same group
assertTrue(process.isRunning());
assertEquals(1, process.getNumIdleClient());
assertEquals(1, process.referenceCount());
assertEquals(2, process.referenceCount());
intpA.interpret("1",
new InterpreterContext(

View file

@ -442,6 +442,9 @@ public class InterpreterFactory {
public void removeInterpretersForNote(InterpreterSetting interpreterSetting,
String noteId) {
if (!interpreterSetting.getOption().isPerNoteSession()) {
return;
}
InterpreterGroup interpreterGroup = interpreterSetting.getInterpreterGroup();
interpreterGroup.close(noteId);
interpreterGroup.destroy(noteId);