if (isTransactional) {
EnvironmentImpl environment = EnvironmentImpl.getCurrent();
Transaction transaction = (environment!=null ? environment.get(Transaction.class) : null);
if (transaction!=null) {
log.trace("registering exception handler to "+transaction);
CommandService commandService = environment.get(CommandService.class);
if (commandService==null) {
throw new JbpmException("environment doesn't have a command service for registering transactional exception handler", exception);
}
ExceptionHandlerSynchronization exceptionHandlerSynchronization = new ExceptionHandlerSynchronization(
this, execution,