use of io.helidon.integrations.cdi.referencecountedcontext.ReferenceCountedContext in project helidon by oracle.
the class JpaTransactionScopedEntityManager method dispose.
void dispose(final Instance<Object> instance) {
final ReferenceCountedContext context = ReferenceCountedContext.getInstanceFrom(this.beanManager);
assert context != null;
assert context.isActive();
final int finalReferenceCount = context.getReferenceCount(this.nonTransactionalEntityManagerBean);
context.decrementReferenceCount(this.nonTransactionalEntityManagerBean, finalReferenceCount - this.startingReferenceCount);
}
Aggregations