public void testDangling() throws Exception {
GlobalComponentRegistry gcr = TestingUtil.extractGlobalComponentRegistry(this.cacheManager);
Interpreter interpreter = gcr.getComponent(Interpreter.class);
String sessionId = interpreter.createSessionId(BasicCacheContainer.DEFAULT_CACHE_NAME);
interpreter.execute(sessionId, "begin; put 'a' 'a';");
assert cache.getAdvancedCache().getTransactionManager().getTransaction() == null;
assert !cache.containsKey("a");
interpreter.execute(sessionId, "start; put 'a' 'a';");
assert cache.getAdvancedCache().getBatchContainer().getBatchTransaction() == null;
assert !cache.containsKey("a");