All locking, by default, is what you call 'willing to wait'.

If you don't want to wait for a lock, you must explicitely add NO_WAIT (or something like that) to your statement.

However, as far as sequence-replacing code goes, you should note that your COMMIT may be problematic. Obviously, you will not be able to call this in the middle of a transaction because of the COMMIT. To alleviate this, you should look into autonomous transactions.

However, if you've fixed your sequence problems, you should really go back to sequences because they are faster.

If not, you should at least use NDS instead of CURSORs because NDS is faster than CURSORs, although still slower than sequences.

HTH,

- Chris