Product Information > JADE Developer’s Reference > Chapter 6 - JADE Locking > Lock Types

Lock Types

The lowest-level lock types are shared locks, followed by reserve locks, then update locks, and the highest-level lock types are exclusive locks.

At the end of transaction state, all session locks are restored to the lock state to which they were last set manually, regardless of any lock type downgrade or upgrade done by transaction locks.

The following table lists lock upgrade and downgrade results.

  Upgrading Type Downgrading Type Same Type
Upgrading Duration

Attempted

Attempted at the end of transaction or load state

Attempted

Downgrading Duration

Attempted for the upgrading lock type

Ignored

Ignored

Same Duration

Attempted

Attempted at the end of transaction or load state

Ignored

The following table lists examples of results when upgrading locks.

Old Lock New Lock Upgrade Result Comment
Transaction exclusive Session exclusive Session exclusive Duration upgrade
Transaction shared Session exclusive Session exclusive Duration and type upgrades
Transaction exclusive Session shared Session exclusive Up to end of transaction, then automatically downgraded to session shared

The following table lists examples of results when downgrading locks.

Old Lock New Lock Downgrade Result Comment
Session shared Transaction exclusive Session exclusive Up to end of transaction, then automatically downgraded to session shared
Session exclusive Transaction exclusive Session exclusive No duration downgrade
Transaction exclusive Transaction shared Transaction shared If not in transaction state
Transaction exclusive Transaction shared Transaction exclusive If in transaction state
Transaction shared Session shared Session shared Attempted
Transaction shared Session exclusive Session exclusive Attempted