GigaSpaces XAP 7.0 API

org.openspaces.events
Class AbstractTransactionalEventListenerContainer

java.lang.Object
  extended by org.openspaces.events.AbstractSpaceListeningContainer
      extended by org.openspaces.events.AbstractEventListenerContainer
          extended by org.openspaces.events.AbstractTemplateEventListenerContainer
              extended by org.openspaces.events.AbstractTransactionalEventListenerContainer
All Implemented Interfaces:
EventListener, ServiceDetailsProvider, ServiceMonitorsProvider, BeanNameAware, DisposableBean, InitializingBean, ApplicationContextAware, ApplicationListener, Lifecycle
Direct Known Subclasses:
AbstractNotifyEventListenerContainer, AbstractPollingEventListenerContainer, SimpleAsyncPollingEventListenerContainer

public abstract class AbstractTransactionalEventListenerContainer
extends AbstractTemplateEventListenerContainer

Author:
kimchy

Field Summary
 
Fields inherited from class org.openspaces.events.AbstractEventListenerContainer
failedEvents, processedEvents
 
Fields inherited from class org.openspaces.events.AbstractSpaceListeningContainer
beanName, logger
 
Constructor Summary
AbstractTransactionalEventListenerContainer()
           
 
Method Summary
protected  DefaultTransactionDefinition getTransactionDefinition()
           
protected  PlatformTransactionManager getTransactionManager()
          Return the Spring PlatformTransactionManager to use for transactional wrapping of message reception plus listener execution.
 String getTransactionManagerName()
           
 void initialize()
          Initialize this container.
protected  boolean isTransactional()
           
 void setDisableTransactionValidation(boolean disableTransactionValidation)
          Should transaction validation be enabled or not (verify and fail if transaction manager is provided and the GigaSpace is not transactional).
 void setTransactionIsolationLevel(int transactionIsolationLevel)
          Specify the transaction isolation to use for transactional wrapping.
 void setTransactionIsolationLevelName(String transactionIsolationLevelName)
          Specify the transaction isolation to use for transactional wrapping.
 void setTransactionManager(PlatformTransactionManager transactionManager)
          Specify the Spring PlatformTransactionManager to use for transactional wrapping of listener execution.
 void setTransactionName(String transactionName)
          Specify the transaction name to use for transactional wrapping.
 void setTransactionTimeout(int transactionTimeout)
          Specify the transaction timeout to use for transactional wrapping, in seconds.
protected  void validateConfiguration()
          Validate the configuration of this container.
 
Methods inherited from class org.openspaces.events.AbstractTemplateEventListenerContainer
afterPropertiesSet, getReceiveTemplate, getTemplate, isPerformSnapshot, setPerformSnapshot, setTemplate
 
Methods inherited from class org.openspaces.events.AbstractEventListenerContainer
doStart, executeListener, getActualEventListener, getApplicationContext, getEventListener, getEventListenerClass, getFailedEvents, getProcessedEvents, handleListenerException, invokeExceptionListener, invokeListener, setApplicationContext, setEventListener, setEventListenerRef
 
Methods inherited from class org.openspaces.events.AbstractSpaceListeningContainer
destroy, doAfterStart, doBeforeStop, doInitialize, doRescheduleTask, doShutdown, doStop, getBeanName, getGigaSpace, getStatus, isActive, isRunning, message, onApplicationEvent, rescheduleTaskIfNecessary, setActiveWhenPrimary, setAutoStart, setBeanName, setGigaSpace, setRegisterSpaceModeListener, shutdown, start, stop, waitWhileNotRunning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.openspaces.pu.service.ServiceDetailsProvider
getServicesDetails
 
Methods inherited from interface org.openspaces.pu.service.ServiceMonitorsProvider
getServicesMonitors
 

Constructor Detail

AbstractTransactionalEventListenerContainer

public AbstractTransactionalEventListenerContainer()
Method Detail

setTransactionManager

public void setTransactionManager(PlatformTransactionManager transactionManager)
Specify the Spring PlatformTransactionManager to use for transactional wrapping of listener execution.

Default is none, not performing any transactional wrapping.


getTransactionManager

protected final PlatformTransactionManager getTransactionManager()
Return the Spring PlatformTransactionManager to use for transactional wrapping of message reception plus listener execution.


setTransactionName

public void setTransactionName(String transactionName)
Specify the transaction name to use for transactional wrapping. Default is the bean name of this listener container, if any.

See Also:
TransactionDefinition.getName()

setTransactionTimeout

public void setTransactionTimeout(int transactionTimeout)
Specify the transaction timeout to use for transactional wrapping, in seconds. Default is none, using the transaction manager's default timeout.

See Also:
TransactionDefinition.getTimeout()

setTransactionIsolationLevel

public void setTransactionIsolationLevel(int transactionIsolationLevel)
Specify the transaction isolation to use for transactional wrapping.

See Also:
DefaultTransactionDefinition.setIsolationLevel(int)

setTransactionIsolationLevelName

public void setTransactionIsolationLevelName(String transactionIsolationLevelName)
Specify the transaction isolation to use for transactional wrapping.

See Also:
DefaultTransactionDefinition.setIsolationLevelName(String)

getTransactionDefinition

protected DefaultTransactionDefinition getTransactionDefinition()

setDisableTransactionValidation

public void setDisableTransactionValidation(boolean disableTransactionValidation)
Should transaction validation be enabled or not (verify and fail if transaction manager is provided and the GigaSpace is not transactional). Default to false.


initialize

public void initialize()
                throws DataAccessException
Description copied from class: AbstractSpaceListeningContainer
Initialize this container. If this container is not configured with "activeWhenPrimary" flag set to true will call AbstractSpaceListeningContainer.doStart() (if it is set to true, lifecycle of the container will be controlled by the current space mode). AbstractSpaceListeningContainer.doInitialize() will be called for additional initialization after the possible AbstractSpaceListeningContainer.doStart() call.

Overrides:
initialize in class AbstractTemplateEventListenerContainer
Throws:
DataAccessException
See Also:
AbstractSpaceListeningContainer.onApplicationEvent(org.springframework.context.ApplicationEvent)

validateConfiguration

protected void validateConfiguration()
Description copied from class: AbstractSpaceListeningContainer
Validate the configuration of this container.

Overrides:
validateConfiguration in class AbstractSpaceListeningContainer

getTransactionManagerName

public String getTransactionManagerName()

isTransactional

protected boolean isTransactional()

GigaSpaces XAP 7.0 API

Copyright © GigaSpaces.