Class DAOUtilTransactionManager
java.lang.Object
org.springframework.transaction.support.AbstractPlatformTransactionManager
org.springframework.jdbc.datasource.DataSourceTransactionManager
fr.paris.lutece.portal.service.database.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:
-
Field Summary
Fields inherited from class org.springframework.transaction.support.AbstractPlatformTransactionManager
SYNCHRONIZATION_ALWAYS, SYNCHRONIZATION_NEVER, SYNCHRONIZATION_ON_ACTUAL_TRANSACTION -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a "fake" datasource to avoid spring checks failure when pool are not initialized.Gets the plugin namevoidprocessPluginEvent(PluginEvent event) Process a plugin eventvoidsetPluginName(String strPluginName) Sets the plugin nameMethods inherited from class org.springframework.jdbc.datasource.DataSourceTransactionManager
afterPropertiesSet, getResourceFactory, isEnforceReadOnly, setDataSource, setEnforceReadOnlyMethods 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, setValidateExistingTransactionMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.transaction.PlatformTransactionManager
commit, getTransaction, rollback
-
Constructor Details
-
DAOUtilTransactionManager
public DAOUtilTransactionManager()Registers the listener toPluginService.
-
-
Method Details
-
getPluginName
Gets the plugin name- Returns:
- the plugin name
-
setPluginName
Sets the plugin name- Parameters:
strPluginName- the plugin name
-
processPluginEvent
Process a plugin event- Specified by:
processPluginEventin interfacePluginEventListener- Parameters:
event- The event to process
-
getDataSource
Returns a "fake" datasource to avoid spring checks failure when pool are not initialized. Returns the current datasource otherwise.- Overrides:
getDataSourcein classorg.springframework.jdbc.datasource.DataSourceTransactionManager- Returns:
- the data source
-