company logo

Sharing database resources within an application

Sharing database resources within an application (thread or process) becomes possible by accessing the same instance or collection by different property handles. Since updated database resources become visible to the other property handle immediately, the application may react faster than in case of local clients.

Sharing indexes within an application

Sharing indexes within an application is similar to indexes shared between local clients, but performance is not critical in this case, since modifications are managed directly within the application.

Sharing instances between property handles

Similar to local clients, changes become public after storing data to database (implicitly or explicitly by calling Property::save(). After changing an instance, all property handles referring to the same instance will access the updated instance version without explicitly refreshing the instance. Thus, changes made within an application become visible immediately for all property handles referring to the instance.

When changing the same instance via different property handles, which is possible, when access mode is set to Update, the first property handle storing the changes will succeed. After storing modifications in the first property handle, accessing any other property handle that has updated the same instance but not yet stored will throw an exception. Thus, one should avoid updating an instance via different property handles in the same application.

In contrast to local client concurrency behavior, conflicts within an application are detected earlier and exceptions are not restricted to the Property::save() function.