Wednesday, November 28, 2012

Lock Files in Weblogic

There are cases where we see

Lock is owned by Another Session
Or [Deployer:149164]The domain edit lock is owned by another session in exclusive mode - hence this deployment operation cannot proceed.

These issues say about the lock being owned by another process.During these cases we need to make sure that the process releases the lock.

There are 4 types of lock available in weblogic

config.lok : This is used for the getting the file lock on the config.xml file.This lock ensures that the config.xml file is being owned by only one process at a time.This also ensures that the updates to config.xml file are done in a sequential order.
Location : cfgdir/config/config.xml

edit.lok : This was the most important lock that we see.This lock ensures that only one user is editing the configurations at any point of time. No 2 operations are performed at a same time
Location : cfgdir/

embeddedLDAP.lok:This file locks access to the embedded ldap server to ensure that only one person has access to the directory server at any time.
Location  /cfgdir/servers/<Server Name>/data/ldap/ldapfiles/

XXXServer.lok:This lock indicates that a given server is running.This ensures that the server is not started or running multiple times.
Location : /cfgdir/servers/<Server Name>/servername.lok

When a webloigc server is stopped, the embeddedLDAP.lok and XXXservername.lok are deleted automatically.

Happy Learning