I have a problem, i have two objects that read in a tamino database. I would like lock a element of tamino database and if the second object read the elemento of tamino database, the getLockMode return true y now return null. Help me, please.
I’m not sure I fully understand your question, but anyway I have a few comments:-
- the getLockMode() method returns the current lock mode on the transaction that was set on the accessor object, not whether the document is locked or not.
- Tamino only locks at the document instance or collection level, and cannot lock on an individual element level.
- if a document is read within a session and that session locks that instance then depending on the combination of lockmode/lockwait parameters you may get a non-zero response from the query which may indicate that that particular document instance is locked. With the Tamino API you may get an appropiate exception being thrown.
For more information, the transaction guide within the Tamino documentation is recommended.