-
Feature Request
-
Resolution: Done
-
Major
-
jBPM 6.1.0.Final
-
None
When container managed transactions are selected, no transaction is present when a timer is fired, causing an exception to be thrown.
Workaround:
Extend ThreadPoolSchedulerService, overriding internalSchedule(), wrapping Callable item in a callable that will wrap the call in a transaction. This service must then be set in the RuntimeEngineBuilder.
i.e.:
private class TxCallable implements Callable<Void> { private Callable<?> delegate; public TxCallable(Callable<?> delegate) { this.delegate = delegate; } @Override public Void call() throws Exception { ut.begin(); try { delegate.call(); ut.commit(); } catch (Exception e) { ut.rollback(); } return null; } }
- is related to
-
JBPM-4287 Support GlobalSchedulerService to run in container manager transaction environment (e.g. ejb timer)
- Resolved