Another use for Auto. transaction
leor, December 19, 2011 - 12:30 pm UTC
Tom, we have another valid use for an autonomous transaction. We have a case where a caller may call a function that enqueues a message to an AQ. We want the message to get sent to the queue regardless of whether the calling context does a commit or not. So, in this case we have the function enqueue call within an autonomous transaction.
Thanks,
December 19, 2011 - 5:04 pm UTC
are you sure you do - or did you just program it that way. Give us a bit of context - why would you want to send a message about an action that might not happen?
visibility DBMS_AQ.immediate
A reader, December 19, 2011 - 8:47 pm UTC
leor,
If you enqueue with visibility DBMS_AQ.immediate then you the transaction is immediately commited to the queue, and you don't need an autonomous transaction.