use of org.wildfly.clustering.ee.BatchContext in project wildfly by wildfly.
the class DistributableSession method getCreationTime.
@Override
public long getCreationTime() {
Session<LocalSessionContext> session = this.entry.getKey();
validate(session);
try (BatchContext context = this.manager.getSessionManager().getBatcher().resumeBatch(this.batch)) {
return session.getMetaData().getCreationTime().toEpochMilli();
}
}
use of org.wildfly.clustering.ee.BatchContext in project wildfly by wildfly.
the class InfinispanBatcherTestCase method resumeNullBatch.
@Test
public void resumeNullBatch() throws Exception {
TransactionBatch batch = mock(TransactionBatch.class);
InfinispanBatcher.CURRENT_BATCH.set(batch);
try (BatchContext context = this.batcher.resumeBatch(null)) {
verifyZeroInteractions(this.tm);
assertNull(InfinispanBatcher.CURRENT_BATCH.get());
}
verifyZeroInteractions(this.tm);
assertSame(batch, InfinispanBatcher.CURRENT_BATCH.get());
}
Aggregations