--- "Shapira, Yoav" <[EMAIL PROTECTED]> wrote: > > Hi, > I have a request from a coworker who uses DbUtils to add a flag to turn > of auto-commit in the QueryRunner. The text of his request is below. > What do you think, is it too big to get into DbUtils 1.0? > > "There needs to be an option on QueryRunner to turn off the commit() > calls on the updates that use a datasource. I would like to use it to > build DAOs which will be used in the context of the JTA. This might be > through either EJB beans or more directly using UserTransaction. The > presence of the commit calls setAutoCommit, commit, rollback) in the > update methods that use a datasource make this impossible with those > methods. What I would like to do is instantiate a QueryRunner with a > flag to turn this off."
The methods using a DataSource were designed to execute in a single transaction. If you disabled the commit and rollback in these methods, how would you handle the transactions manually without access to the Connection? If you want to control Connections with commit and rollback you can just use the update() methods that take a Connection as the first argument. David > > Yoav Shapira > Millennium ChemInformatics > > > > > > This e-mail, including any attachments, is a confidential business > communication, and may contain information that is confidential, > proprietary and/or privileged. This e-mail is intended only for the > individual(s) to whom it is addressed, and may not be saved, copied, > printed, disclosed or used by anyone else. If you are not the(an) > intended recipient, please immediately delete this e-mail from your > computer system and notify the sender. Thank you. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > __________________________________ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard http://antispam.yahoo.com/whatsnewfree --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
