Announcement Announcement Module
Collapse
No announcement yet.
Transaction Timeout Persisting Across Different Transactions Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Transaction Timeout Persisting Across Different Transactions

    Hi all,

    I'm using Spring with JDBC and Oracle 10G. I've got a class I call the "TransactionManager" that handles requests from users. The TransactionManager instantiates another class which does all the Spring/JDBC work I call "Transactor" for lack of a better name, and gives this class the request. The Transactor instantiates a DataSourceTransactionManager on the DataSource, inserts the various records and returns. The problem I'm continuously running into is that requests do not appear to always get their own transaction. It seems that once more than a few requests per second start coming in that Transactions are persisted across requests and this eventually leads to me getting a transaction timeout deadline was... type error. I think I've tried just about every kind of propagation and it didn't make a difference. I'm doing all this programatically not declaratively but I don't think that should really matter. I thought transaction scope was supposed to be limited to the object's scope, which is why I instantiate a new Transactor and new DataSourceTransactionManager each time.

    So in short I guess my question is two fold. Why is the transaction persisting across requests? What is the proper way to handle this scenario?

  • #2
    Hello

    The problem I'm continuously running into is that requests do not appear to always get their own transaction.
    If you could post your configuration to get a clear idea, it would be better

    If you are recieving an error, post the complete error stack trace

    What is the proper way to handle this scenario?
    Have you read the Spring Documentation about transactions specially about Propagation and Isolation?

    Comment


    • #3
      If you could post your configuration to get a clear idea, it would be better
      As I said I'm doing this programatically, so there isn't really any configuration other than my BasicDataSource.

      If you are recieving an error, post the complete error stack trace
      There is no stack trace, only the error stating the transaction timed out and it gives me the deadline for the transaction

      Have you read the Spring Documentation about transactions specially about Propagation and Isolation?
      Yes, Although obviously I don't understand it fully.

      If someone could succinctly tell me which types of propagation and isolation i want for my task that would be great. As I stated I have a class that handles incoming requests. Each of these requests should have its own transaction and be isolated from all the others. It should be really simple.

      Comment

      Working...
      X