Core Java| JSP| Servlets| XML| EJB| JEE5| Web Services| J2ME| Glossary| Questions?

 

 

 

 

 

 

 

 

 

 

 

 

 

Search Tutorials:
 

Software Solutions and Services
 

 
  JDO Tutorials
  EAI Articles
  Struts Tutorials
  Java Tutorials
  Java Certification
  Java Applet
Questions
Comments
 
Important JDBC Concepts 
 

Transactions: 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.

 

Important JDBC Concepts

                         

Transactions: 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.

Logging: on the server--->logging--->JDBC.

By this we can enable JDBC logging and specify a log file name for the JDBC log.

Attributes of Logging:

1) Enable JDBC Logging: It determines whether the server has a JDBC log file.

2) JDBC Log File Name: It is the name of the log file.

Isolation: The isolation is needed when there are concurrent transactions. Concurrent transactions are transactions are transactions that occurs at the same time. In isolation one transaction does not interfere with another. For setting the isolation level for a JDBC transaction, use the

Connection.setTransaction(int level) method

By using the snapshot isolation level we can only see the snapshot of the data locked by other transactions when running from inside the transaction with snapshot isolation level.

Some of the transaction level are given below:

1). TRANSACTION_NONE

2). TRANSACTION_READ_UNCOMMITED

3. TRANSACTION_READ_COMMITTED

4. TRANSACTION_REPEATABLE_READ

5. TRANSACTION_SERIALIZABLE

By setting the isolation levels you are having an impact on the performance of the transaction. You can get the existing isolation level with:

getTransactionIsolation() method.

Concurrency: Database concurrency controls ensure that the transactions occur in an ordered fashion.

Concurrency control deals with the issue involved with allowing multiple people simultaneous access to shared entities.

 

                         

» View all related tutorials
Related Tags: sql mysql c ant jdbc help tutorial ria this for to drive e des in sta m nt wan j

Leave your comment:

Name:

Email:

URL:

Title:

Comments:


Enter Code:

Audio Version
Reload Image
 

Note: Emails will not be visible or used in any way, and are not required. Please keep comments relevant. Any content deemed inappropriate or offensive may be edited and/or deleted.

No HTML code is allowed. Line breaks will be converted automatically. URLs will be auto-linked. Please use BBCode to format your text.

Add This Tutorial To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 

Current Comments

5 comments so far (
post your own) View All Comments Latest 10 Comments:

In this page on the paragraph ISOLATION, In the second line i think some error in the sentence please take a look and rectify that .....

Posted by Mohan on Friday, 12.5.08 @ 01:10am | #82424

Hi this is a very good site for beginners.It has detailed explanation about the code and methods.thanx a lot..

Posted by vijaya reddy on Saturday, 05.24.08 @ 10:37am | #60843

how to retrive 10 rows from database in each page.

Posted by debi on Wednesday, 05.7.08 @ 16:29pm | #58795

Good Job!

Posted by luozhonghui on Sunday, 04.20.08 @ 08:24am | #57279

this jdbc notes is usefull

Posted by pavan on Thursday, 09.6.07 @ 21:52pm | #25310

Training Courses
Tell A Friend
Your Friend Name
Website Designing Services
 
Web Designing Packages From $150!
 
Website Designing Company Web Hosting
 
Website Designing Quotation
 
Search Tutorials:

 

 
 

Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Search Engine | News Archive | Jboss 3.0 tutorial | Free Linux CD's | Forum | Blogs

About Us | Advertising On RoseIndia.net  | Site Map

India News

Indian Software Development Company | iPhone Development Company in India | Flex Development Company in India | Java Training Delhi | Java Training at Noida |

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2008. All rights reserved.