Results 1 to 3 of 3

Thread: Jdbc - Transaction per request

  1. #1

    Default 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.

  2. #2
    Join Date
    Feb 2007
    Location
    Moscow, Russia
    Posts
    56

    Default

    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?

  3. #3

    Default

    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
  •