RE: How do you tell orion not to autocommit?
Wrap a transaction around your operation. This way, the transaction will begin when your operation starts, and commits only when your operation is complete. Unless, you are accessing your entity beans from a client layer. This is one of the reasons why you need to use Stateless session beans to wrap your model. You should never have to touch the autoCommit property of a connection. -AP_ http://www.myprofiles.com/member/profile/apara_personal -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of prasanth sb Sent: Saturday, May 25, 2002 10:44 PM To: Orion-Interest Subject: Re: How do you tell orion not to autocommit? Hi Keith, If you are using Bean managed persistence, then get the connection object using jndi lookup, then use connection.setAutocommit(false). I am not aware how to do this in container managed persistence.Can some great guys explain this?Wish you a good day. thanks, Prasanth God gives you more than you expect From: Keith Kwiatek [EMAIL PROTECTED] Reply-To: Orion-Interest [EMAIL PROTECTED] To: Orion-Interest [EMAIL PROTECTED] Subject: How do you tell orion not to autocommit? Date: Wed, 17 Apr 2002 07:16:48 -0400 Hello, I am running orion with a datasource and some jsp's with some jdbc beans. When I insert/update/delete it seems to be set to autocommit. How do I tell orion not to autocommit? Thanks, Keith _ Send and receive Hotmail on your mobile device: http://mobile.msn.com
Re: How do you tell orion not to autocommit?
Hi Keith, If you are using Bean managed persistence, then get the connection object using jndi lookup, then use connection.setAutocommit(false). I am not aware how to do this in container managed persistence.Can some great guys explain this?Wish you a good day. thanks, Prasanth God gives you more than you expect From: Keith Kwiatek [EMAIL PROTECTED] Reply-To: Orion-Interest [EMAIL PROTECTED] To: Orion-Interest [EMAIL PROTECTED] Subject: How do you tell orion not to autocommit? Date: Wed, 17 Apr 2002 07:16:48 -0400 Hello, I am running orion with a datasource and some jsp's with some jdbc beans. When I insert/update/delete it seems to be set to autocommit. How do I tell orion not to autocommit? Thanks, Keith _ Send and receive Hotmail on your mobile device: http://mobile.msn.com
Re: How do you tell orion not to autocommit?
But I am using connection pooling I tried this and it does not seem to work... is it something I have to set with the connection pool? Thanks, Keith - Original Message - From: Juan Pablo Lorandi [EMAIL PROTECTED] To: Orion-Interest [EMAIL PROTECTED] Sent: Wednesday, April 17, 2002 12:22 PM Subject: RE: How do you tell orion not to autocommit? Excerpt from the API docs for method java.sql.Connection.setAutoCommit(boolean autoCommit) follows setAutoCommit public void setAutoCommit(boolean autoCommit) throws SQLException Sets this connection's auto-commit mode. If a connection is in auto-commit mode, then all its SQL statements will be executed and committed as individual transactions. Otherwise, its SQL statements are grouped into transactions that are terminated by a call to either the method commit or the method rollback. By default, new connections are in auto-commit mode. The commit occurs when the statement completes or the next execute occurs, whichever comes first. In the case of statements returning a ResultSet, the statement completes when the last row of the ResultSet has been retrieved or the ResultSet has been closed. In advanced cases, a single statement may return multiple results as well as output parameter values. In these cases the commit occurs when all results and output parameter values have been retrieved. Parameters: autoCommit - true enables auto-commit; false disables auto-commit. Throws: SQLException - if a database access error occurs HTH, Juan Pablo Lorandi Chief Software Architect Code Foundry Ltd. [EMAIL PROTECTED] Barberstown, Straffan, Co. Kildare, Ireland. Tel: +353-1-6012050 Fax: +353-1-6012051 Mobile: +353-86-2157900 www.codefoundry.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Keith Kwiatek Sent: Wednesday, April 17, 2002 12:17 PM To: Orion-Interest Subject: How do you tell orion not to autocommit? Hello, I am running orion with a datasource and some jsp's with some jdbc beans. When I insert/update/delete it seems to be set to autocommit. How do I tell orion not to autocommit? Thanks, Keith
RE: How do you tell orion not to autocommit?
Excerpt from the API docs for method java.sql.Connection.setAutoCommit(boolean autoCommit) follows setAutoCommit public void setAutoCommit(boolean autoCommit) throws SQLException Sets this connection's auto-commit mode. If a connection is in auto-commit mode, then all its SQL statements will be executed and committed as individual transactions. Otherwise, its SQL statements are grouped into transactions that are terminated by a call to either the method commit or the method rollback. By default, new connections are in auto-commit mode. The commit occurs when the statement completes or the next execute occurs, whichever comes first. In the case of statements returning a ResultSet, the statement completes when the last row of the ResultSet has been retrieved or the ResultSet has been closed. In advanced cases, a single statement may return multiple results as well as output parameter values. In these cases the commit occurs when all results and output parameter values have been retrieved. Parameters: autoCommit - true enables auto-commit; false disables auto-commit. Throws: SQLException - if a database access error occurs HTH, Juan Pablo Lorandi Chief Software Architect Code Foundry Ltd. [EMAIL PROTECTED] Barberstown, Straffan, Co. Kildare, Ireland. Tel: +353-1-6012050 Fax: +353-1-6012051 Mobile: +353-86-2157900 www.codefoundry.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Keith Kwiatek Sent: Wednesday, April 17, 2002 12:17 PM To: Orion-Interest Subject: How do you tell orion not to autocommit? Hello, I am running orion with a datasource and some jsp's with some jdbc beans. When I insert/update/delete it seems to be set to autocommit. How do I tell orion not to autocommit? Thanks, Keith