Event Notification

Various events generated within the Transaction Server may be intercepted by a user-written handler, where additional processing of the event can be done. Unlike tasks, these events do not follow a timed schedule. They happen only as a result of a specific event occurring within the Transaction Server. For event handlers to receive notification of events within the Transaction Server, write an event handler and register it in the scheduler XML file using the event tag. An event handler is a Java™ program that implements the com.ibm.icpcs.transactionserver.event.EventHandler interface. The interface can be found in the Transaction Server toolkit, txsvrtk.jar, located in the Transaction Server installation path
public interface EventHandler
{
     public abstract void process ( Event event ) throws EventHandlerEx
}
The event handler interface has a single method called process that accepts a single argument representing the event being reported. The process method is invoked each time the event occurs within the Transaction Server. The event parameter can be examined for the details of the event being posted and has the following interface:
public interface Event { 
   public int getEventCode ( );
   public String getEventDescription ( );
   public Object getParameter ( String parameterName );
   public boolean isRetry ( );
   public Connection getConnection();
   public EventLogger getLogger();
}
The getEventCode method is used to retrieve an enumerated value that identifies the type of event being posted. The event interface has enumerations for the following event codes:
CODE_ENTRY_UOW_STATE_CHANGE = 1; 
CODE_TRACER_UOW_STATE_CHANGE = 2;
BDAY_STATUS_CHANGE = 3;
CODE_TRACKED_ITEM_OVERDUE = 4;
CODE_TASK_STATE_CHANGE = 5;
CODE_BDAY_PURGE_EVENT = 6;
CODE_PRESENTMENT_GROUP_LOADED_EVENT = 7;
CODE_PRESENTMENT_STATE_CHANGE = 8;
CODE_SEGMENT_STATE_CHANGE = 9;
CODE_DUPLICATE_DETECTED_EVENT = 10;
CODE_DUPLICATE_REVIEWED_EVENT = 11;