This question is locked. New answers and comments are not allowed.
Hi,
we are still using openaccess classic.
The application is mutlithreaded and uses different ObjectScopes.
One common problem is that a background thread (or even another process) can compute objects. The user can access the object in the meantime resulting sometimes in an OptimisticVerificationException.
In this case user changes something (lets say corrected an address) while a backgroudn job computed other values.
We want the following behaviour:
Changes should not be lost. If user changes something, the "something" should be applied to the object.
E.g. Lets say the background process computes a material property like density and user changes the materials name we want in case of concurency that
- both changes are done. (e.g. if density is changed first and OptimisticVerificationException appears density should be saved AND new name should be saved)
- if multiple processes change the same propery - the last one should always win.
If we do an Transaction.Commit() and the OptimisticVerificationException appears it seems that changes are lost. (Transaction.GetDirtyObjects no longer has any changes).
Is there a generic way to
- preserve all changes and make a Refresh of an object not changing Properties which are changed in current transaction
- preserve all changes even if an OptimisticVerifivationException occurs to do the Refresh in a loop?
Best regards,
Wolfgang
we are still using openaccess classic.
The application is mutlithreaded and uses different ObjectScopes.
One common problem is that a background thread (or even another process) can compute objects. The user can access the object in the meantime resulting sometimes in an OptimisticVerificationException.
In this case user changes something (lets say corrected an address) while a backgroudn job computed other values.
We want the following behaviour:
Changes should not be lost. If user changes something, the "something" should be applied to the object.
E.g. Lets say the background process computes a material property like density and user changes the materials name we want in case of concurency that
- both changes are done. (e.g. if density is changed first and OptimisticVerificationException appears density should be saved AND new name should be saved)
- if multiple processes change the same propery - the last one should always win.
If we do an Transaction.Commit() and the OptimisticVerificationException appears it seems that changes are lost. (Transaction.GetDirtyObjects no longer has any changes).
Is there a generic way to
- preserve all changes and make a Refresh of an object not changing Properties which are changed in current transaction
- preserve all changes even if an OptimisticVerifivationException occurs to do the Refresh in a loop?
Best regards,
Wolfgang