Transaction Listeners
Transaction Listeners
A transaction listener is a class within the Transaction Listener Processor. Creo Elements/Direct ships two transaction listeners – the Email Listener and the Task Agent listener. You can also add your own custom transaction listeners.
Event Processing
The transaction listener's transactionApplied (TransactionEvent event) method is guaranteed to be called for each listener until the event is successfully processed. The event is considered to be successfully processed when the method returns without throwing an Exception.
Implementation Detail and Resulting Limitation
When a listener successfully returns from its transactionApplied (event) method for a given event, that event is marked complete for that listener. This is done by adding the listener's base class name to the LISTENERS_DONE column on the event's document in the MM_QUEUE.
When all the transaction listeners have successfully completed the events, the event document is deleted from the MM_QUEUE and the database.
A limitation of this implementation is that all transaction listener base class names must be unique, and that the number of listeners is limited by the concatenation of all their base names fitting in the 1024-byte LISTENERS_DONE attribute string. These limitations should be easy to avoid. Fatal exceptions are thrown upon startup if these limitations are not observed. The base name for com.osm.webservices.event.EmailHandler is EmailHandler.
Was this helpful?