- All Implemented Interfaces:
Runnable
@SQLAction(implementor="notFromDDR",
requires="strictlyNestedTest fn",
install="select strictlyNestedTest()")
public class ThreadTest
extends Object
implements Runnable
Test control of access to 1-thread backend by n-thread JVM.
The "select strictlyNestedTest()" is marked "notFromDDR" because it actually
does deadlock when invoked from within install_jar, though it
succeeds when invoked directly. The explanation may lie in the JNI spec's
caveat that JNI MonitorEnter/MonitorExit functions must be paired with each
other and not arbitrarily mixed with JVM monitorenter/monitorexit bytecodes.
In the present design, that can happen (install_jar uses a synchronized
block to call into the backend when executing DDR commands; DDR command
calling strictlyNestedTest leads to JNI MonitorExit in BEGIN_CALL; perhaps
that does not effectively release the lock taken by the synchronized block).