I have a problem where I want to lock a sales agreement header record while it is being updated by a class that is called from in inbound port, the reason is that the system that calls the inbound port is multi-threaded so there could be 2 or more sessions trying to update the same sales agreement and the processing can take a second or two so I don't want the other thread starting until the first one has ended.
I've tried putting a pessimistic locking select on the agreement header in the class but it doesn't seem to be working, I can still select and update the same sales agreement from another session when it should be locked.
Am I missing something, can you not do this in a class attached to an inbound port, i'm assuming that the whole inbound instance of the class is already in a TTS transaction so I don't need on in my class ?
thanks.
*This post is locked for comments