Issue #3748 Fix regression for injecting Resource on AsyncListeners

Signed-off-by: Jan Bartel <janb@webtide.com>
This commit is contained in:
Jan Bartel 2019-06-07 17:50:06 +02:00
parent dd79b516f3
commit 41b2d64815
2 changed files with 6 additions and 2 deletions

View File

@ -1103,7 +1103,8 @@ public class NamingContext implements Context, Dumpable
/* ------------------------------------------------------------ */
public boolean isLocked()
{
return _lock != null || (_parent!=null && _parent.isLocked());
//TODO lock whole hierarchy?
return _lock != null;
}
/* ------------------------------------------------------------ */

View File

@ -479,7 +479,10 @@ public class TestJNDI
{
zzz = new InitialContext();
((Context)zzz.lookup("java:comp/ttt/ttt2")).bind("zzz2", "zzz2");
//TODO test deep locking
// ((Context)zzz.lookup("java:comp/ttt/ttt2")).bind("zzz2", "zzz2");
// fail("Should not be able to write to locked context");
((Context)zzz.lookup("java:comp")).bind("foo", "bar");
fail("Should not be able to write to locked context");
}
catch (NamingException ne)