Search in sources :

Example 1 with JobOperatorContext

use of org.jberet.spi.JobOperatorContext in project quarkus-jberet by quarkiverse.

the class JBeretRecorder method initJobOperator.

public void initJobOperator(final JBeretConfig config, final ThreadPoolConfig threadPoolConfig, final BeanContainer beanContainer) {
    ManagedExecutor managedExecutor = beanContainer.instance(ManagedExecutor.class);
    TransactionManager transactionManager = beanContainer.instance(TransactionManager.class);
    QuarkusJobOperator operator = new QuarkusJobOperator(config, threadPoolConfig, managedExecutor, transactionManager, JBeretDataHolder.getJobs());
    JobOperatorContext operatorContext = JobOperatorContext.create(operator);
    JobOperatorContext.setJobOperatorContextSelector(() -> operatorContext);
}
Also used : TransactionManager(javax.transaction.TransactionManager) JobOperatorContext(org.jberet.spi.JobOperatorContext) ManagedExecutor(org.eclipse.microprofile.context.ManagedExecutor)

Aggregations

TransactionManager (javax.transaction.TransactionManager)1 ManagedExecutor (org.eclipse.microprofile.context.ManagedExecutor)1 JobOperatorContext (org.jberet.spi.JobOperatorContext)1