Skip to content

Commit 194e5e2

Browse files
committed
Fix heading capitalization
1 parent 1921608 commit 194e5e2

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

content/en/docs/refguide/runtime/optimistic-locking.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,49 +14,49 @@ Optimistic locking is a strategy used in concurrent systems to prevent **lost up
1414

1515
If a conflict is detected—meaning someone else has modified the data since you last read it—your update is rejected, and you typically have to re-read the data and try again.
1616

17-
## Project with Optimistic locking disabled
17+
## Project With Optimistic Locking Disabled
1818

1919
When two modifications are saved, they are applied in the order of processing. Only changed attributes are written to the database. This means that if two objects with disjoint sets of changed attributes are committed, the changes are not overwritten.
2020

2121
For example, if one user commits changes for `AttributeA` and `AttributeB` and another user commits changes for `AttributeB` and `AttributeC` for the same object, then both `AttributeA` and `AttributeC` are committed according to both users' changes. `AttributeB` is committed based on whichever change was committed last.
2222

23-
## Project with Optimistic locking enabled
23+
## Project With Optimistic Locking Enabled
2424

2525
The Mendix runtime implements optimistic locking by introducing a new attribute named `MxObjectVersion` with type `Long` to all entities tracking their version. The `MxObjectVersion` attribute is not write-protected. However, setting this value will **not** result in it being saved to the database. Its current value will be compared with the value for the same record in the database.
2626

27-
### How to enable and use optimistic locking
27+
### How to Enable and Use Optimistic Locking
2828

2929
Optimistic locking can be enabled per Mendix application using the `Runtime` tab in the App settings dialog:
3030

3131
{{< figure src="/attachments/refguide/runtime/optimistic-locking/runtime-settings-dialog.png" >}}
3232

3333
After optimistic locking is enabled, whenever a commit is executed, the Mendix runtime will automatically ensure that the object that is committed was not already changed by another party after the committer read the object.
3434

35-
### New projects and migration
35+
### New Projects and Migration
3636

3737
In case an existing app already had the `MxObjectVersion` attribute, when optimistic locking is enabled a duplicate attribute will be reported in the Modeler. This must be fixed by renaming the existing attribute to another name. The system attribute cannot be renamed.
3838

3939
### Behavior
4040

4141
Here we describe how various runtime actions are influenced by optimistic locking:
4242

43-
#### Create object
43+
#### Create Object
4444

4545
Initialize the `MxObjectVersion` attribute to `0`.
4646

47-
#### Commit object
47+
#### Commit Object
4848

4949
When the `MxObjectVersion` attribute in the object being committed is different from the value in the database, or the object was deleted from the database, throw a `ConcurrentModificationRuntimeException`. Otherwise, proceed with the commit while incrementing `MxObjectVersion` by one.
5050

51-
#### Delete object
51+
#### Delete Object
5252

5353
When the `MxObjectVersion` attribute in the object being deleted is different from the value in the database, throw a `ConcurrentModificationRuntimeException`. Otherwise, proceed with the delete. If the object was already deleted, no error occurs, as is the case without optimistic locking.
5454

55-
## Performance impact
55+
## Performance Impact
5656

5757
Because of the version check performed during commit and delete, optimistic locking incurs some minor performance impact.
5858

59-
## Handling optimistic locking errors in Microflows
59+
## Handling Optimistic Locking Errors in Microflows
6060

6161
When an optimistic locking error occurs, the runtime log contains an entry similar to the following:
6262

@@ -83,26 +83,26 @@ An example can be seen below. The change action has error handling `Custom witho
8383

8484
Check the [documentation](https://docs.mendix.com/refguide/error-handling-in-microflows/) about error handling to find more information about differences between `Custom with Rollback` and `Custom without Rollback`.
8585

86-
## Handling optimistic locking errors in Java actions
86+
## Handling Optimistic Locking Errors in Java Actions
8787

88-
In Java actions an optimistic locking error can be handled by similar steps described in [Handling optimistic locking errors in Microflows]. However, the `com.mendix.systemwideinterfaces.connectionbus.data.ConcurrentModificationRuntimeException` exception will not be the top level exception thrown by the Mendix runtime. It will be wrapped in another exception, so the `cause` chain of caught exceptions should be inspected.
88+
In Java actions an optimistic locking error can be handled by similar steps described in [Handling Optimistic Locking Errors in Microflows]. However, the `com.mendix.systemwideinterfaces.connectionbus.data.ConcurrentModificationRuntimeException` exception will not be the top level exception thrown by the Mendix runtime. It will be wrapped in another exception, so the `cause` chain of caught exceptions should be inspected.
8989

90-
## Handling optimistic locking errors in the client
90+
## Handling Optimistic Locking Errors in the Client
9191

9292
If the optimistic locking error is propagated to the client, then an error dialog is shown as follows:
9393

9494
{{< figure src="/attachments/refguide/runtime/optimistic-locking/optimistic-locking-error-dialog.png" >}}
9595

9696
To handle the optimistic locking error one of the following strategies can be used:
9797

98-
### Single `Save` button
98+
### Single `Save` Button
9999

100100
In this case user can refresh the whole page losing all changes.
101101

102-
### `Save` button with a separate `Refresh` button
102+
### `Save` Button With a Separate `Refresh` Button
103103

104104
A separate `Refresh` button that retrieves the latest object state from the database and applies the original changes onto the retrieved object. After clicking the `Refresh` button, the user can inspect the latest state and can click the `Save` button again.
105105

106-
### Custom `Save` button
106+
### Custom `Save` Button
107107

108-
A custom `Save` button that retries saving object using similar steps described in [Handling optimistic locking errors in Microflows], to retry until successful.
108+
A custom `Save` button that retries saving object using similar steps described in [Handling Optimistic Locking Errors in Microflows], to retry until successful.

0 commit comments

Comments
 (0)