-
1. Re: Commiting transaction on timeout/shutdown
davidjencks Mar 11, 2002 7:22 PM (in response to ushankar)It's always polite to indicate what version of jboss you are using. It's even more polite to include a junit test case or at least some simple sample code demonstrating the problem.
When you say "JTA API" do you mean you are using UserTransaction?
Are you sure youre datasource isn't somehow set to autocommit? -
2. Re: Commiting transaction on timeout/shutdown
ushankar Mar 12, 2002 7:50 PM (in response to ushankar)Sorry about that. The JBOSS version I am using is Jboss-2.4.3. I am using this along with Oracle 8.1.7. Yes. I am using UserTransaction API for beginning and committing a transaction. I will greatly appreciate if you can tell me how one would turn Autocommit to off in data source.
Regards,
Shankar -
3. Re: Commiting transaction on timeout/shutdown
davidjencks Mar 12, 2002 8:37 PM (in response to ushankar)If you use XADataSourceLoader with XADataSourceImpl autocommit is automatically set off. If you use JDBCDataSourceLoader autocommit is on, and you can't use the transaction manager through UserTransaction to control transactions.
-
4. Re: Commiting transaction on timeout/shutdown
ushankar Mar 13, 2002 6:18 PM (in response to ushankar)I am using XADataSourceLoader.
OracleDS
org.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl
jdbc:oracle:thin:@pc-22.3mts.com:1521:bdnalocl
bizdna
bizdna
and the transaction settings are,
100
oracle.jdbc.xa.OracleXid
When I leave a transaction open and shutdown jboss, the corresponding data gets committed. -
5. Re: Commiting transaction on timeout/shutdown
dpiemonte Jul 4, 2002 12:37 PM (in response to ushankar)Hi,
I 'm having the same problem. I can not solve it, in fact, if you use Oracle JDBC driver, I think there is no solution at all. In Oracle documentation: "JDBC Developer's Guide and Reference Release 2" (http://otn.oracle.com/tech/java/sqlj_jdbc/content.html) you can read the following note:
"If auto-commit mode is disabled and you close the connection without explicitly committing or rolling back your last changes, then an implicit COMMIT operation is executed."
I 'm quite sure that this behaviour does not respect JDBC specification, but it is in the documentation.
I don't know how exactly JBoss manage connections when it shuts down or time up occurs, but if it directly closes open connections, an automatic commit is performed.
By the way I'll appreciate if somebody can tell what exactly JBoss does with open connections when it shuts down or time up occurs. There are no roll backs, aren't there??
thank you, I hope this help.