Home Answers Viewqa JDBC define transactions

 
 


Nagendran
define transactions
1 Answer(s)      a year ago
Posted in : JDBC

define transactions

View Answers

May 9, 2012 at 4:41 PM


Whenever a connection is created by using the JDBC, then by default it is in auto- commit mode. This means that SQL statement will be automatically committed immediately after it is executed and it is treated as a transaction. But imagine a situation where you want to execute a batch of statements, either they should commit at on go or they should get failed together. For this we need to disable the auto- commit mode by using the method:

con.setAutoCommit(false).

After setting the auto- commit as false, no SQL statement will be committed until we call the con.commit() method. If there arises any problem while committing then the set of statements will be rollback, without committing.









Related Pages:
Define the session factory interface in hibernate?
Define the session factory interface in hibernate?  Define the session factory interface in hibernate?   Session factory is used... that is reusable between transactions at a process, or cluster
managing the transactions
should i write in EJB (i am using SEAM) to manage the transactions
a class named Transactions
a class named Transactions  Write this java code for me: a class named Transactions that holds the memo and the amount of a transaction. Prompt the user for the number of transactions and create a new Transaction object
Identify correct and incorrect statements about the Application Assembler's responsibilities, including the use of deployment descriptor elements related to transactions and the identifica
related to transactions and the identification of the methods of a particular... to transactions and the identification of the methods of a particular bean.... The Application Assembler MUST NOT define transaction attributes
Define HibernateTemplate?
Define HibernateTemplate?  Hi, Define HibernateTemplate? Thanks
Chapter 11. Transactions
;TransactionsIdentify correct and incorrect statements or examples about EJB transactions... transactions. The Enterprise JavaBeans architecture allows an application... (BMT) demarcation, the enterprise bean code demarcates transactions using
Define stack
Define stack  hii, Explain stack
define a constant.
define a constant.  How do you define a constant?   Hi, With the help of define() directive, you can create constant in php. And here is how: <?php define('NAME', 'Bharat'); ?> Thanks
Define please!?!
Define please!?!  What is tree map sort
Chapter 5. EJB transactions
transactions Build EJBs which satisfy transactional requirements EJB transactions are a set of concepts and a set... transactions; the container must do everything. Therefore, if your transaction
Define Simulation
Define Simulation  hello,, Explain Simulation?   hii, Simulation is the process of forming an abstract model from a real situation in order to understand the impact of modifications and the effect of introducing
Define stack
Define stack  hii, Explain stack?   hello, Stack is an ordered list in which all the insertions and deletions made at one end called top of the stack. It is referred as LIFO list. Last inserted item is deleted First
Define hiberanate
Define hiberanate  What is Hibernate?   Hibernate is a pure java ORM (object-relational mapping) and persistence framework that allows you to map POJO (Plain Old Java Obiect) to relational database tablea using(XML
Creating Hibernate Sessions and Transactions through Spring - AOP .
Creating Hibernate Sessions and Transactions through Spring - AOP .  ... and Transactions using Spring-AOP. Can you provide a sample code where Hibernate Sessions and Transactions are created using Spring-AOP when the control flows
Creating Hibernate Sessions and Transactions through Spring - AOP .
Creating Hibernate Sessions and Transactions through Spring - AOP .  ... and Transactions using Spring-AOP. Can you provide a sample code where Hibernate Sessions and Transactions are created using Spring-AOP when the control flows
Creating Hibernate Sessions and Transactions through Spring - AOP .
Creating Hibernate Sessions and Transactions through Spring - AOP .  ... and Transactions using Spring-AOP. Can you provide a sample code where Hibernate Sessions and Transactions are created using Spring-AOP when the control flows
Creating Hibernate Sessions and Transactions through Spring - AOP .
Creating Hibernate Sessions and Transactions through Spring - AOP .  ... and Transactions using Spring-AOP. Can you provide a sample code where Hibernate Sessions and Transactions are created using Spring-AOP when the control flows
Creating Hibernate Sessions and Transactions through Spring - AOP .
Creating Hibernate Sessions and Transactions through Spring - AOP .  ... and Transactions using Spring-AOP. Can you provide a sample code where Hibernate Sessions and Transactions are created using Spring-AOP when the control flows
define string variable in php
define string variable in php  how to define string variable in PHP
php define array
php define array  How to define array in PHP
php define variable
php define variable  How to define a simple and a global variable in PHP
define a constant in php
define a constant in php   hii, How do you define a constant in php?   hello, we can define a constant in php like this define ("CONST", 50
Define computer software.
Define computer software.  How to define a computer software?   A computer software is a set of instruction that tell the computer what to do
user define exception programs
user define exception programs  user define exception programs   Please visit the following links: http://www.roseindia.net/java/java-exception/user-defined-exception.shtml http://www.roseindia.net/java/exceptions
Define float in Java
Define float in Java  Hi, What is the correct method to define... JavaFloatExample { /* Learn How to define and use float variable in Java...); } } Thanks  public class JavaFloatExample { /* Learn How to define
objective c define float
objective c define float  Hi, How to define float variable in objective c? Thanks   Hi, Here is the example of defining float variable. float i; i=10; Thanks   Hi, Here is another example: // File
Define Tag:
Define Tag:       bean:define Tag - is used to define a scripting variable based on the value(s) of the specified bean... as null. bean:define Tag can't be used  to instantiate a DynaActionForm
How do you define a constant?
How do you define a constant?  How do you define a constant in php
When will you define a method as static?
When will you define a method as static?  Hi, When will you define a method as static? thanks
need complete jsp code for transactions using mysql - WebSevices
need complete jsp code for transactions using mysql  iam doing online banking project.i want the code to transfer funds from one account to another... to lasya or lasya to prathika. I need complete jsp code for transactions using
How to define a constant variable in Java?
How to define a constant variable in Java?   Hi, How to define a constant variable in Java? thanks   HI, The Constants variables are declared using the final keyword. The values of the constant can't be changed
import user-define package - Applet
import user-define package  how to import user-define package to the frame/graphic of the applet. could i create a new frame or not ?? please help me ...  Hi friend, import java.io.*; import java.awt.*; import
Facelet define Tag
Facelet define Tag          This tag is used to define the name of the content... this define tag. This name attribute is required to be same as name attribute
How to define variable in Velocity
How to define variable in Velocity       This Example shows you how to define a variable in velocity. Methods used in this example are described below:- 1:- Initialize
Define candidate key, alternate key, composite key.
Define candidate key, alternate key, composite key.  Define candidate key, alternate key, composite key
How to Define Text Field Validation iPhone
How to Define Text Field Validation iPhone  Hi, Can anybody explain me how to define textfield validation iPhone program. please phone online help reference or example. Thanks
How to Define Vector Iterator in Java Program
How to Define Vector Iterator in Java Program  Hi, I want to develop a small application where i want to define vector iterator in my Java Programming. Kindly Suggest any online reference for references. Thanks
Define and use Macro in Velocity
Define and use Macro in Velocity       This Example shows you how to define and use macro in velocity  template and also shows how to use Iterator in velocity  template
Define sequence generated primary key in hibernate
Define sequence generated primary key in hibernate  How to define sequence generated primary key in hibernate?   Use value "sequence" for class attribute for generator tag. <id column="USER_ID" name="id" type
user-define package for applet - Java Beginners
user-define package for applet  how to import a user-define package to applet ??  Hi import javax.swing.*; import java.awt.Graphics; import javax.swing.JApplet; public class WelcomeLines extends JApplet
how to import user-define package to applet - Applet
how to import user-define package to applet  how to import user-define package to applet... can u write a java coding can execute in jdk only .... thx...  Hi friend, import java.applet.*; import java.util.
Given a list of responsibilities, identify whose which are the Container's with respect to transactions, including the handling of getRollbackOnly, setRollbackOnly, getUserTransacti
with respect to transactions, including the handling... with respect to transactions, including the handling of getRollbackOnly..., for both container and bean-managed transactions
ShortBuffer in java, Define the order of byte in short buffer.
ShortBuffer in java, Define the order of byte in short buffer. In this tutorial, we will see how to define the order of byte in short buffer. ShortBuffer API: The java.nio.ShortBuffer class extends java.nio.Buffer class. It provides
Aside tag in HTML5, Define aside &lt;aside&gt; tag in HTML5.
Aside tag in HTML5, Define aside <aside> tag in HTML5. In this section, we will define the use and implementation of aside <aside> tag of HTML5.  The aside tag is used to show a section of a text that is related
C define Macro
C define Macro      ... identifiers with constants, keywords, and statements or expressions,  #define directive is used. You can see in the given example, we have define a macro i.e SQUARE
Display Current Date using JSP Custom(user define) Tag
Display Current Date using JSP Custom(user define) Tag In this section, we... define) tag. JSP Custom Tags : Provide a mechanism to a Web programmer... to custom tags for which you can define attributes to customize the behavior
User Define Alert Example
User Define Alert Example       Creating a user defined alert message, In the given example we have created a image that can be fill with some colors and text
how can i define only one method from the interface. - Java Beginners
how can i define only one method from the interface.  If i am having an interface with 3 methods(declaration) . If i want to use only one method..., If u declare the methods in interface then it must be define in the class
How can I Define a JFrame subclass that has four vertically positioned buttons. - Java Beginners
How can I Define a JFrame subclass that has four vertically positioned buttons.  How can I Define a JFrame subclass that has four vertically positioned buttons. The labels for the four buttons are Senior, Junior, Sophomore

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.