anonymous wrote : First, not sure how a web service forum is the correct place for a discussion of Hibernate functionality... But that aside... |
Sorry, I was searching for this problem and just replied here... anonymous wrote : 101: define "possible running transaction". The integration code assumes you are using JTA transactions and JTA DataSource. Is that the case? Sounds like not. I'm not sure how this works and I don't want to waste your time, but what happens if I have a running transaction (let's say a JTA transaction) in which I open a H session. In after statement aggressive release mode H closes (returns to the pool) the JDBC connection after each statement? How can it be done if the JDBC connection is opened in the transaction context? What happens at a possible rollback? How will the JDBC connection be rolled back? I'm directly using Hibernate from the web layer, and I have an aspect that automatically opens/closes H sessions as needed. In case of an open() I also session.beginTransaction()/commit()/rollback() as needed. The aspect worked/works fine, I've even checked the JDBC connection.close() calls H invokes from the H log and it seemed also right (open/close balanced). And still the JDBC pool was exhausted, no idea why/how tough. It started with 4.0.3. So we started to look why and found this aggressive release suspicious, and turned off. It solved out connection leak problem, but I still don't see why. anonymous wrote : I need to understand your setup to better understand what might need to change code-wise. BTW, setting the release mode to "on close" is typically on masking issues in your application code; hence why your solution may not be the best. Well, all I know is that our open/close calls to the H session is balanced. Do I have to take care of any other things? And from your response I suspect that if I start a JTA transaction before opening the H session then 4.0.3 would work fine with the default setup? So should I look up UserTransaction and begin a JTA transaction before H session open? Thanks for you time! View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3902501#3902501 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3902501 ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ JBoss-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jboss-user
