This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Oracle/OAS and the fly likes Transaction in trigger Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Oracle/OAS
Bookmark "Transaction in trigger" Watch "Transaction in trigger" New topic
Author

Transaction in trigger

aakash bhatt
Ranch Hand

Joined: Jan 09, 2003
Posts: 182
In my table A i have a post insert and post update trigger which updates the Audit log
when ever data is inserted or updated in table.
But when the data inserted/ or updated rollbacks, will the Audit log entry will be rollbacked?
If not how to rollback the entries from audit log.
Basically how to maintain transaction in triggers?
Remar Uy
Ranch Hand

Joined: Mar 18, 2002
Posts: 35
Aakash,
Your data in the audit log would be rolled back. But if you want the audit log to be committed even the insert/update of the table fails, you can use autonomous transaction pragma, if you're using Oracle8i or above.
Hth,
Remar
[ June 25, 2003: Message edited by: Remar Uy ]
[ June 25, 2003: Message edited by: Remar Uy ]
 
Don't get me started about those stupid light bulbs.
 
subject: Transaction in trigger
 
Similar Threads
getting latest 100 rows inserted into table
Envers configuration with hibernate.cfg.xml
Audit Logging in Ibatis.
Hibernate CRUD Audit
How to create a trigger with Hibernate ?