@Override public void release(V value) { try (BatchContext context = this.manager.getBatcher().resumeBatch(value.getCacheContext())) { try (Batch batch = value.getCacheContext()) { try { Bean<K, V> bean = this.manager.findBean(value.getId()); if (bean != null) { if (bean.release()) { bean.close(); } } } catch (RuntimeException | Error e) { batch.discard(); throw e; } } } }