If we were to do this OACS-wide, I suppose we'd have the
(object_type, package_id, object_no, object_id)
with a unique (object_type, package_id, object_no)
table, and a helper PL/SQL proc which could do what you suggest: Grab the numer it thinks is right, and keep trying to insert a row into this table until it succeeds, then return the object_no to the caller.
Do you think that could be made to perform well enough?
/Lars