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?
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.
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.
I am using XADataSourceLoader.
and the transaction settings are,
When I leave a transaction open and shutdown jboss, the corresponding data gets committed.
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.