Search in sources :

Example 1 with ReferenceCountedContext

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);
}
Also used : ReferenceCountedContext(io.helidon.integrations.cdi.referencecountedcontext.ReferenceCountedContext)

Aggregations

ReferenceCountedContext (io.helidon.integrations.cdi.referencecountedcontext.ReferenceCountedContext)1