protected internal virtual void createJobExecutorRegistrations(ISet <string> deploymentIds) { try { //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final org.camunda.bpm.engine.impl.persistence.deploy.DeploymentFailListener deploymentFailListener = new org.camunda.bpm.engine.impl.persistence.deploy.DeploymentFailListener(deploymentIds, org.camunda.bpm.engine.impl.context.Context.getProcessEngineConfiguration().getCommandExecutorTxRequiresNew()); DeploymentFailListener deploymentFailListener = new DeploymentFailListener(deploymentIds, Context.ProcessEngineConfiguration.CommandExecutorTxRequiresNew); Context.CommandContext.TransactionContext.addTransactionListener(TransactionState.ROLLED_BACK, deploymentFailListener); ISet <string> registeredDeployments = Context.ProcessEngineConfiguration.RegisteredDeployments; registeredDeployments.addAll(deploymentIds); } catch (Exception e) { throw LOG.exceptionWhileRegisteringDeploymentsWithJobExecutor(e); } }
protected internal virtual void registerWithJobExecutor(CommandContext commandContext, DeploymentEntity deployment) { try { (new RegisterDeploymentCmd(deployment.Id)).execute(commandContext); } finally { DeploymentFailListener listener = new DeploymentFailListener(deployment.Id, Context.ProcessEngineConfiguration.CommandExecutorTxRequiresNew); try { commandContext.TransactionContext.addTransactionListener(TransactionState.ROLLED_BACK, listener); } catch (Exception) { TX_LOG.debugTransactionOperation("Could not register transaction synchronization. Probably the TX has already been rolled back by application code."); listener.execute(commandContext); } } }
protected internal virtual void RegisterWithJobExecutor(CommandContext commandContext, DeploymentEntity deployment) { try { (new RegisterDeploymentCmd(deployment.Id)).Execute(commandContext); } finally { DeploymentFailListener listener = new DeploymentFailListener(deployment.Id); try { commandContext.TransactionContext.AddTransactionListener(TransactionJavaStatus.RolledBack, listener); } catch (System.Exception) { TxLog.DebugTransactionOperation( "Could not register transaction synchronization. Probably the TX has already been rolled back by application code."); listener.Execute(commandContext); } } }