Search code examples
weblogicwlst

How to override edit locks


I'm writing a WLST script to deploy some WAR's and an EAR. However, intermittently, the script will time out because it can't seem to get an edit lock (this script is part of a chain of many other scripts). I was wondering, is there a way to override or stop any current locks on the server? This is only a temporary solution, but in the interest of time, it will do for now.

Thanks.


Solution

  • You could try setting a wait period and timeout:

    startEdit([waitTimeInMillis], [timeoutInMillis], [exclusive]).  
    

    Are other scripts erroring out, leaving the session locked? You could try adding exception handling around those. Also, if you have 'Automatically acquire lock" enabled in the Admin Console and you use the admin console sometimes it can cause problems if you are running scripts at the same time, even though you are not making "lock-requiring" changes.

    Also, are you using the same user for the chained scripts?