Class SpringTransactionsProcessEngineConfiguration

Direct Known Subclasses:
SpringProcessEngineConfiguration

public class SpringTransactionsProcessEngineConfiguration extends ProcessEngineConfigurationImpl
Author:
Tom Baeyens, David Syer, Joram Barrez, Daniel Meyer
  • Field Details

    • transactionManager

      protected org.springframework.transaction.PlatformTransactionManager transactionManager
    • deploymentName

      protected String deploymentName
    • deploymentResources

      protected org.springframework.core.io.Resource[] deploymentResources
    • deploymentTenantId

      protected String deploymentTenantId
    • deployChangedOnly

      protected boolean deployChangedOnly
  • Constructor Details

    • SpringTransactionsProcessEngineConfiguration

      public SpringTransactionsProcessEngineConfiguration()
  • Method Details

    • checkAutocommitEnabled

      protected void checkAutocommitEnabled()
      Suppresses the autocommit check for Spring-managed deployments.

      In a Spring context, all Camunda DB operations run inside Spring-managed transactions. The TransactionAwareDataSourceProxy wrapping applied by this configuration ensures that, when a Spring transaction is active, each connection is enlisted in that transaction and has autoCommit=false set by the transaction manager before use. During engine bootstrap, the autocommit check runs outside of any transaction and therefore observes the pool connection's default auto-commit value (often true), which can lead to a false-positive ENGINE-12022 warning when transactionsExternallyManaged is overridden to false.

      Overriding this method as a no-op is safe: Spring guarantees correct transaction boundaries, so the autocommit setting of the underlying pool connection is irrelevant.

      Overrides:
      checkAutocommitEnabled in class ProcessEngineConfigurationImpl
    • buildProcessEngine

      public ProcessEngine buildProcessEngine()
      Overrides:
      buildProcessEngine in class ProcessEngineConfigurationImpl
    • getDefaultCommandInterceptorsTxRequired

      protected Collection<? extends CommandInterceptor> getDefaultCommandInterceptorsTxRequired()
      Specified by:
      getDefaultCommandInterceptorsTxRequired in class ProcessEngineConfigurationImpl
    • getDefaultCommandInterceptorsTxRequiresNew

      protected Collection<? extends CommandInterceptor> getDefaultCommandInterceptorsTxRequiresNew()
      Specified by:
      getDefaultCommandInterceptorsTxRequiresNew in class ProcessEngineConfigurationImpl
    • initTransactionContextFactory

      protected void initTransactionContextFactory()
      Overrides:
      initTransactionContextFactory in class ProcessEngineConfigurationImpl
    • autoDeployResources

      protected void autoDeployResources(ProcessEngine processEngine)
    • getFileResourceName

      protected String getFileResourceName(org.springframework.core.io.Resource resource)
    • setDataSource

      public ProcessEngineConfigurationImpl setDataSource(DataSource dataSource)
      Overrides:
      setDataSource in class ProcessEngineConfigurationImpl
    • getTransactionManager

      public org.springframework.transaction.PlatformTransactionManager getTransactionManager()
    • setTransactionManager

      public void setTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager)
    • getDeploymentName

      public String getDeploymentName()
    • setDeploymentName

      public void setDeploymentName(String deploymentName)
    • getDeploymentResources

      public org.springframework.core.io.Resource[] getDeploymentResources()
    • setDeploymentResources

      public void setDeploymentResources(org.springframework.core.io.Resource[] deploymentResources)
    • getDeploymentTenantId

      public String getDeploymentTenantId()
    • setDeploymentTenantId

      public void setDeploymentTenantId(String deploymentTenantId)
    • isDeployChangedOnly

      public boolean isDeployChangedOnly()
    • setDeployChangedOnly

      public void setDeployChangedOnly(boolean deployChangedOnly)