9.4.7. Configure Locking Mode (Library Mode)

In JBoss Data Grid's Library mode, the locking mode is set within the transaction element as follows:
<transaction transactionManagerLookupClass="{TransactionManagerLookupClass}"
	     transactionMode="{TRANSACTIONAL,NON_TRANSACTIONAL}"
	     lockingMode="{OPTIMISTIC,PESSIMISTIC}"
	     useSynchronization="true">
		<recovery enabled="true" 
			  recoveryInfoCacheName="{CacheName}" />
</transaction>
Set the lockingMode value to OPTIMISTIC or PESSIMISTIC to configure the locking mode used for the transactional cache.