예제 #1
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);
                }
            }
        }