Announcement Announcement Module
Collapse
No announcement yet.
long running transaction db lock... Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • long running transaction db lock...

    Hey there guys

    I'm not entirely new to spring but no were near advanced.I searched high and low for a easy example/ explanation for my question.

    Here is the details.

    I'm using spring, hibernate and c3p0.
    I have lets say 30 available database connections.
    during the course of execution I contact a remote host and wait for a response. If the host is down I wait X seconds for it to respond. During that time a database connection is occupied.Lets say 30 users connect then the 31'st user would not be able to get a database connection.

    My question is: Is it possible to kill the hibernate database connection during the timeout period?..and HOW!!!??

    thx a mil guys.

  • #2
    My question is: Is it possible to kill the hibernate database connection during the timeout period?..and HOW!!!??
    Seems it depends really from C3PO, you have many parameters, check this link
    HowTo configure the C3P0 connection pool

    BTW Spring has an attribute to set a limit time to rollback a transaction, check the Spring documentation about Transactions + timeout attribute

    Comment

    Working...
    X