32: if (g_debug = 1) then
33: debug('get lock handler '||l_lock_name);
34: end if;
35:
36: dbms_lock.allocate_unique(
37: lockname => l_lock_name
38: ,lockhandle => l_lock_handle);
39:
40: return l_lock_handle;
67: if(g_debug = 1) then
68: debug('Release the lock : '||l_lock_handle);
69: end if;
70:
71: x_err_code := dbms_lock.release(l_lock_handle);
72: -- parameter error,illegal lockhandle
73: if x_err_code IN (3,5) THEN
74: fnd_message.set_name('INV','INV_LOCK_RELEASE_ERROR');
75: x_err_msg := fnd_message.get;
106: if(g_debug = 1) then
107: debug('Got the lockhandle : '||l_lock_handle);
108: end if;
109:
110: x_err_code := dbms_lock.request(
111: lockhandle => l_lock_handle
112: ,lockmode => dbms_lock.x_mode
113: ,timeout => dbms_lock.maxwait
114: ,release_on_commit => TRUE);
108: end if;
109:
110: x_err_code := dbms_lock.request(
111: lockhandle => l_lock_handle
112: ,lockmode => dbms_lock.x_mode
113: ,timeout => dbms_lock.maxwait
114: ,release_on_commit => TRUE);
115:
116:
109:
110: x_err_code := dbms_lock.request(
111: lockhandle => l_lock_handle
112: ,lockmode => dbms_lock.x_mode
113: ,timeout => dbms_lock.maxwait
114: ,release_on_commit => TRUE);
115:
116:
117: if (x_err_code not in (0,4)) then
850: l_ret := FND_CONCURRENT.SET_COMPLETION_STATUS('ERROR',ERRBUF);
851: /* Added following if condition for bug 7588761 */
852: /* we should release any outstanding locks */
853: if g_lock_handle is not null then
854: l_err_code := dbms_lock.release(g_lock_handle);
855: end if;
856:
857: ROLLBACK;
858: RETURN;