-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: What if my transactions are too long?
PostPosted: Wed Nov 25, 2009 3:00 pm 
Newbie

Joined: Fri Nov 21, 2008 8:56 pm
Posts: 15
Ok... My application is having a problem... Sometimes, it seems that I run out of available transactions, but when I check the database transactions all of them are idle... When this happens, the only way to solve it seems to be to stop the application and restart it.
I believe the problem may be that some of my transactions are really long. I update many objects and then commit my transactions. And I do this on several threads.
To fix this problem, first I want to understand why it happens. Even though my transactions are long, they should be able to finish eventually, right? Why isn't that the case here? Does it matter that some of these threads are doing changes on the same tables?


Top
 Profile  
 
 Post subject: Re: What if my transactions are too long?
PostPosted: Sat Nov 28, 2009 7:24 pm 
Newbie

Joined: Wed Oct 21, 2009 7:33 am
Posts: 11
It would be nice if we can see your code. But it's usually the problem on how the transactions are handled. Transactions should be atomic. You would have performance issues when another transaction is kick-off within a transaction. If you have several threads manipulating a given data/subset of data in one transaction, i think that should be fine as long as the threads doesn't cause any dirty reads or writes. I don't really know what the goal of multiple threads running in your app and it would be nice if you can write a pseudo-code so it'll she more light on the problem.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.