Class DAOUtilTransactionManager

  • All Implemented Interfaces:
    PluginEventListener, Serializable, org.springframework.beans.factory.InitializingBean, org.springframework.transaction.PlatformTransactionManager, org.springframework.transaction.support.ResourceTransactionManager, org.springframework.transaction.TransactionManager

    public class DAOUtilTransactionManager
    extends org.springframework.jdbc.datasource.DataSourceTransactionManager
    implements PluginEventListener
    DataSource transaction manager. This transaction manager use Spring transaction manager, and do not use TransactionManager. This transaction manager allow to use transaction in a given plugin, but does not influence other plugins. To create transactions throw multiple plugins, use LuteceTransactionManager
    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from class org.springframework.transaction.support.AbstractPlatformTransactionManager

        SYNCHRONIZATION_ALWAYS, SYNCHRONIZATION_NEVER, SYNCHRONIZATION_ON_ACTUAL_TRANSACTION
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      DataSource getDataSource()
      Returns a "fake" datasource to avoid spring checks failure when pool are not initialized.
      String getPluginName()
      Gets the plugin name
      void processPluginEvent​(PluginEvent event)
      Process a plugin event
      void setPluginName​(String strPluginName)
      Sets the plugin name
      • Methods inherited from class org.springframework.jdbc.datasource.DataSourceTransactionManager

        afterPropertiesSet, getResourceFactory, isEnforceReadOnly, setDataSource, setEnforceReadOnly
      • Methods inherited from class org.springframework.transaction.support.AbstractPlatformTransactionManager

        commit, getDefaultTimeout, getTransaction, getTransactionSynchronization, isFailEarlyOnGlobalRollbackOnly, isGlobalRollbackOnParticipationFailure, isNestedTransactionAllowed, isRollbackOnCommitFailure, isValidateExistingTransaction, rollback, setDefaultTimeout, setFailEarlyOnGlobalRollbackOnly, setGlobalRollbackOnParticipationFailure, setNestedTransactionAllowed, setRollbackOnCommitFailure, setTransactionSynchronization, setTransactionSynchronizationName, setValidateExistingTransaction
      • Methods inherited from interface org.springframework.transaction.PlatformTransactionManager

        commit, getTransaction, rollback
    • Constructor Detail

      • DAOUtilTransactionManager

        public DAOUtilTransactionManager()
        Registers the listener to PluginService.
    • Method Detail

      • getPluginName

        public String getPluginName()
        Gets the plugin name
        Returns:
        the plugin name
      • setPluginName

        public void setPluginName​(String strPluginName)
        Sets the plugin name
        Parameters:
        strPluginName - the plugin name
      • getDataSource

        public DataSource getDataSource()
        Returns a "fake" datasource to avoid spring checks failure when pool are not initialized. Returns the current datasource otherwise.
        Overrides:
        getDataSource in class org.springframework.jdbc.datasource.DataSourceTransactionManager
        Returns:
        the data source