コード例 #1
0
        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);
            }
        }
コード例 #2
0
        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);
                }
            }
        }
コード例 #3
0
ファイル: DeployCmd.cs プロジェクト: zf321/ESS.FW.Bpm
        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);
                }
            }
        }