-
May 19th, 2007, 12:49 PM
#1
Jdbc - Transaction per request
hi, I am using jdbcdaosupport for data access. what i want to do is to setup transaction management such that a transaction spans an http request. I am familiar with setting up PlatformTransactionManager for business apis but that sounds like an overkill for m current requirements.
Any advice on what is the best approach for this would help. I am not sure if this means applying interceptors to controller methods or some servlet filter.
-
May 19th, 2007, 02:27 PM
#2
We do it in a filter.
However, there's a big issue you have to worry about - error handling.
Usually any exception will cause transaction rollback, but how are you going to display error page is transaction has gone?
-
May 19th, 2007, 03:30 PM
#3
thanks for the post.
i think i will be fine with redirecting the user to a standard error page which says somthing like 'bad shit happened, we are sorry'!! are there other ways to do this. this seems like a widely used pattern for handling transaction as opposed to doing it on business methods. but again i cant find many reference to this approach.
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