-
Apr 22nd, 2008, 01:50 AM
#1
any exception handler for @tranasactional ?
hi,
I have a @transactional save(Image img), if Runtime transaction occurs, then the database will rollback.
but when i save image file in the file system, i want to delete the file if any runtime exception occurs.
just wondering is any better way to solve this problem (like register an exception handler in @transactional ) instead of running a cron job or somthing else.
kiwi
---
happay hacking !
-
Apr 22nd, 2008, 02:03 AM
#2
You can still catch the exception (outside the transactional method, i so in the calling code, Transaction will still rollback) but you are able to do some work yourself.
You also might want to look for transactional file system access, there are some frameworks (apache has one also I believe) which can tap into a jta transaction manager.
-
Apr 22nd, 2008, 02:29 AM
#3
ok thx!
kiwi
----
happy hacking !
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules