Hi all,
we’re developing a web application which manages some schemas on Tamino.
We can update a schema using this web-app, and now we need to lock that schema (while user is changing it) to avoid other users change documents on this schema.
we’ve written a code to lock the schema doing a ‘define’ operation on the schema on a local transaction, but this locks all the schemas on the collection.
There is a way to lock only one schema (by code)?
Thanks.
Hi Ramirez. I’d like to know how lock a schema by code too.
Bye Tostao!!
Hi!
There is no way for an application to lock a schema (with all the doctypes defined inside).
As a workaround for your problem, would it be possible to have a separate collection per schema?
Short explanation:
The server lock granules are collection, doctypes and documents. When “updefining” a schema, it is essential for Tamino’s request processing that all affected doctypes are exclusively locked. It can occur that such affected doctypes are defined in different schema documents in different collections, if these other schemas use import or include statements as provided in the XML Schema recommendation (will come with Tamino Version 4.2).
Tamino cannot rely on any user requested locks but has to acquire at least these locks on all affected doctypes. For internal implementation reasons and to ease locking we had decided to lock the entire collection when doing a define operation. So, even if there would be a programming interface to lock doctypes, the define operation later on would need to upgrade to collection locks. With two such operations on two doctypes in the same collection this would lead to a deadlock scenario.
Regards
Michael
Hi Michael,
Thanks for your message, and sorry for the late reply, but I’ve out of the office some time.
I don’t know if to separate each schema on a different collection is a valid solution for us, because these schemas are defined by the user using our web application, and potentialy, they could define a hugh number of schemas.
Thanks again.
Regards
Javier