Transaction, TransactionHandler, Event

#1

I need to implement a callback on SourceFile.create(), and call my method in that callback. SourceFile.create() takes a Transaction argument. I’m guessing that the actual argument would be a TransactionHandler and that my method would somehow be an implementation of txnCommitted(event). But that’s just a guess.

I cannot find any examples of how to accomplish this. Is an example or more information available somewhere?

Also: where in my code would my callback to SourceFIle.create() be declared?

0 Likes

#2

Never mind. I have the answer. Just declare the method on the Persistable type and it will be called with the correct parameters.

0 Likes