File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB and other Java EE Technologies and the fly likes Transactions with MS - Access ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Transactions with MS - Access ?" Watch "Transactions with MS - Access ?" New topic

Transactions with MS - Access ?

Reghu Ram Thanumalayan
Ranch Hand

Joined: Oct 21, 2003
Posts: 193
Hello friends,
I was trying Container Managed Transactions using a Stateful Session Bean with MS Access as the database.
The session bean executes an insert and update statements on the database table in a business method. At the end of the method, i called setRollbackOnly on the sessioncontext object. It means that the insert and update statements should not be reflected in the database.
But the changes were not rolledback but they were commited.I tried with the transaction attributes Requires and RequiredNew in the DD.
Is this a problem with MS- Access since i heard that Access has an auto commit option. Please shed some light on this.

Cheers,<br />Reghu Ram T<br /> <br />SCJP 1.4 - 98 %, SCBCD 1.3 - 94 %, SCMAD 1.0 - 92 %
Valentin Crettaz
Gold Digger

Joined: Aug 26, 2001
Posts: 7610
MS Access is not part of the SCBCD exam. I'm moving this thread to the EJB forum. Please continue this discussion there. Thank you

[Blog] [Blogroll] [My Reviews] My Linked In
Kyle Brown
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
Won't work AFAIK because Access ONLY allows autocommit. It doesn't have real transactions that cross multiple SQL statements, which is what you need to do.

Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at for other WebSphere information.
Reghu Ram Thanumalayan
Ranch Hand

Joined: Oct 21, 2003
Posts: 193
Thanks for helping me out because i would have wasted more time trying to solve this.
Don't get me started about those stupid light bulbs.
subject: Transactions with MS - Access ?
It's not a secret anymore!