"101" wrote : | 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? | Well, within the bounds of a JTA transaction, multiple calls to DataSource.getConnection() return the same physical JDBC connection. Otherwise releasing connections after each statement would be silly, right ;)
"101" wrote : | ... and turned off. It solved out connection leak problem... | To what did you set it? "101" wrote : | 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? | See my comments above. Without the JTA transaction being in progress, I'm not sure what JBoss's behavior is regarding re-acquiring the same JDBC connection. If the same connection is not being returned, this would have potential hueristic transaction failure problems; but I just don't see how even this scenario would cause problems with connections being leaked. Just to be clear, I know this works: | UserTransaction ut = ...; | DataSource ds = ...; | | ut.begin(); | Connection conn = ds.getConnection(); | // do something... | conn.close(); | Connection conn2 = ds.getConnection(); | // do something more... | conn2.close(); | | ut.commit(); | because both conn and conn2 above point to the same physical JDBC connection. But I am not sure how (or if) that works if that code is not wrapped in the ut.begin() and ut.commit(). View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3902528#3902528 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3902528 ------------------------------------------------------- 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
