atg.markers.bp
Class BusinessProcessEventSynchronization

java.lang.Object
  extended by atg.markers.bp.BusinessProcessEventSynchronization
All Implemented Interfaces:
javax.transaction.Synchronization

public class BusinessProcessEventSynchronization
extends java.lang.Object
implements javax.transaction.Synchronization

This transaction synchronization class is used for sending business process event messages. Objects of this type are created by the BusinessProcessManager.

A synchronization object is used to ensure that the transaction, in which the event was created, has been successfully commited before the event is sent.

See Also:
BusinessProcessManager

Field Summary
static java.lang.String CLASS_VERSION
          Class version string
protected  BusinessProcessEventMessage mBusinessProcessEvent
           
protected  java.lang.String mBusinessProcessEventType
           
protected  BusinessProcessManager mBusinessProcessManager
           
 
Constructor Summary
BusinessProcessEventSynchronization(BusinessProcessManager pBusinessProcessManager, BusinessProcessEventMessage pBusinessProcessEvent, java.lang.String pBusinessProcessEventType)
          Constructs a new BusinessProcessEventSynchronization object.
 
Method Summary
 void afterCompletion(int pStatus)
          This method sends the business process event messages through the Business Process Manager's messageSource.
 void beforeCompletion()
          No-op implementation of beforeCompletion
 BusinessProcessEventMessage getBusinessProcessEvent()
          Returns BusinessProcessEvent that will be sent.
 java.lang.String getBusinessProcessEventType()
          Returns the JMS Message type used when sending the event message
 BusinessProcessManager getBusinessProcessManager()
          Returns property BusinessProcessManager
 void setBusinessProcessEvent(BusinessProcessEventMessage pBusinessProcessEvent)
          Sets the BusinessProcessEvent that will be sent.
 void setBusinessProcessEventType(java.lang.String pBusinessProcessEventType)
          property BusinessProcessEventType Sets the JMS Message type used when sending the event message
 void setBusinessProcessManager(BusinessProcessManager pBusinessProcessManager)
          Sets the instance of BusinessProcessManager that created the instance of this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string


mBusinessProcessEvent

protected BusinessProcessEventMessage mBusinessProcessEvent

mBusinessProcessEventType

protected java.lang.String mBusinessProcessEventType

mBusinessProcessManager

protected BusinessProcessManager mBusinessProcessManager
Constructor Detail

BusinessProcessEventSynchronization

public BusinessProcessEventSynchronization(BusinessProcessManager pBusinessProcessManager,
                                           BusinessProcessEventMessage pBusinessProcessEvent,
                                           java.lang.String pBusinessProcessEventType)
Constructs a new BusinessProcessEventSynchronization object.

Parameters:
pBusinessProcessManager - the business process manager that is triggering the event.
pBusinessProcessEvent - the event
pBusinessProcessEventType - the jms type of the event
Method Detail

setBusinessProcessEvent

public void setBusinessProcessEvent(BusinessProcessEventMessage pBusinessProcessEvent)
Sets the BusinessProcessEvent that will be sent.


getBusinessProcessEvent

public BusinessProcessEventMessage getBusinessProcessEvent()
Returns BusinessProcessEvent that will be sent.


setBusinessProcessEventType

public void setBusinessProcessEventType(java.lang.String pBusinessProcessEventType)
property BusinessProcessEventType Sets the JMS Message type used when sending the event message


getBusinessProcessEventType

public java.lang.String getBusinessProcessEventType()
Returns the JMS Message type used when sending the event message


setBusinessProcessManager

public void setBusinessProcessManager(BusinessProcessManager pBusinessProcessManager)
Sets the instance of BusinessProcessManager that created the instance of this object. It provides the message source.


getBusinessProcessManager

public BusinessProcessManager getBusinessProcessManager()
Returns property BusinessProcessManager


afterCompletion

public void afterCompletion(int pStatus)
This method sends the business process event messages through the Business Process Manager's messageSource.

pStatus must be STATUS_COMMITTED for messages to be triggered.

Specified by:
afterCompletion in interface javax.transaction.Synchronization
Parameters:
pStatus - - transaction completion status.

beforeCompletion

public void beforeCompletion()
No-op implementation of beforeCompletion

Specified by:
beforeCompletion in interface javax.transaction.Synchronization