db4o |

# ExtObjectContainer.Lock Method

returns the main synchronisation lock.

object Lock();

#### Return Value

Object the ObjectContainer lock object

#### Remarks

returns the main synchronisation lock.
Synchronize over this object to ensure exclusive access to the ObjectContainer.
Handle the use of this functionality with extreme care, since deadlocks can be produced with just two lines of code.

#### See Also

ExtObjectContainer Interface | com.db4o.ext Namespace