GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  J2EE  >  JDBC
Go To First  |  Previous Question  |  Next Question 
 JDBC  |  Question 129 of 137    Print  
A user leaves an online shopping cart without checking out.Which of the following interfaces will notify to rollback the transaction?
A user leaves an online shopping cart without checking out.Which of the following interfaces will notify to rollback the transaction?
a)HttpSession
b)HttpSessionBindingListener
c)HttpServlet
d)SingleThreadModel
e)FtpSession



  
Total Answers and Comments: 2 Last Update: April 10, 2008     Asked by: ravikumar3 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
April 04, 2008 17:00:37   #1  
saurabhskhetan Member Since: April 2008   Contribution: 1    

RE: A user leaves an online shopping cart without checking out.Which of the following interfaces will notify to rollback the transaction?
It will be HTTPSessionBindingListener which can be used to notify the rollback to the transaction. This interface has an unbound method which can be overridden to perform the above functionality
 
Is this answer useful? Yes | No
April 09, 2008 17:49:52   #2  
phanikhk Member Since: April 2008   Contribution: 2    

RE: A user leaves an online shopping cart without checking out.Which of the following interfaces will notify to rollback the transaction?
Any class can implement HttpSessionBindingListener interface. This interface includes two methods valueBound() and valueUnbound() that are called whenever the object that implements the interface is bound or unbound from a session.

Typical example could be - you might want to close the dbconnection if it is unbound from session.

class MyConnectionHolder implements HttpSessionBindingListerner

Connection dbCon;

public MyConnectionHolder(Connection con) {
dbCon con;
}

public void valueBound(HttpSessionBindingEvent event) {
// Do nothing
}

public void valueUnbound(HttpSessionBindingEvent event) {
dbCon.close();
}
}

 
Is this answer useful? Yes | No

 Related Questions

Answered by anoop shukla on 2005-05-02 10:33:27: transaction is collection of logical operation that perform a task 
Latest Answer : Transaction is a set of statements treated as a single logical operation.It satisfies the ACID property. ...

SQLWarning objects are a subclass of SQLException that deal with database access warnings. Warnings do not stop the execution of an application, as exceptions do; they simply alert the user that something 

Latest Answer : in java program if we want execute a statment 1) load the driver by using Class.forname("driver")2) get connection by using driverManager.getConnection("DataSource")3) createStatement con.createStatement();4) execute the query n get resultset. ...
Read Answers (2) | Asked by : chandu

A) When a connection is created, it is in auto-commit mode.B) If the value is true each individual SQL statement is treated as a transaction and will be automatically committed right after it is executed.C) 
Latest Answer : Hi,  I think (D) is the right answer. ...

A) SQLWarning objects are a subclass of SQLException that deal with database access warningsB) Warnings stop the execution of an application, as exceptions do; they simply alert the user that something 
Latest Answer : No. The JDBC-ODBC Bridge does not support concurrent access from different threads. The JDBC-ODBC Bridge uses synchronized methods to serialize all of the calls that it makes to ODBC. Multi-threaded Java programs may use the Bridge, but they won't get ...

A) In this java applications interact directly with the database.B) A JDBC driver is required to communicate with the particular database management system that is being accessed.C) This model is referred 
Latest Answer : B) A JDBC driver is required to communicate with the particular database management system that is being accessed. ...

A) TRANSACTION_READ_UNCOMMITTEDB) TRANSACTION_READ_ COMMITTEDC) TRANSACTION_SERIALIZABLED) TRANSACTION_REPEATABLE_READ.Explanation: A Dirty read allows a row changed by one transaction to be read by another 
Latest Answer : B) TRANSACTION_READ_ COMMITTED ...

A) TRANSACTION_READ_UNCOMMITTEDB) TRANSACTION_READ_ COMMITTEDC) TRANSACTION_SERIALIZABLED) TRANSACTION_REPEATABLE_READ.Explanation: A non-repeatable read is where one transaction reads a row, a second 
Latest Answer : a,b ...

A) TRANSACTION_READ_UNCOMMITTEDB) TRANSACTION_READ_ COMMITTEDC) TRANSACTION_SERIALIZABLED) TRANSACTION_REPEATABLE_READ.Explanation: A phantom read is where one transaction reads all rows that satisfy a 
Latest Answer : These will allow phanthom readRead_uncommitedRead_commitedRepeatable_read ...

Latest Answer : A transaction is atomic unit of Work.The tasks which are made into the transaction act as a unit which can be executed successfully all,or if at least one task fails to its promise ,then the effect of all the tasks are to be rollbacked.Thus transaction ...
Read Answers (2) | Asked by : nandagopal


 Sponsored Links

 
Related Articles

Online Virtual Business Network

How to begin an Online Virtual Business Network What is Virtual Business Network Business and commerce right from the ancient days depended a lot on the physical representation of the business and the physical identity of the customers and other collaborators Most of the business dealings were done
 

On-Line Transaction Processing

On-Line Transaction Processing On-Line Transaction Processing is a processing that supports the daily business operations. Also know as operational processing and OLTP.  An OLTP is a database which must typically allow the real-time processing of SQL transactions to support traditional reta
 

The Interview Snafu

How to turn someone else’s mistake to your advantage Your dream job is about to become reality. A recruiter gave you the heads up about the perfect position at Humungous Conglomerate, Inc. You went through five interviews as well as a battery of psychological tests mandated by their HR de
 

Winning a Job Interview with a Winning Resume

Does your resume unlock your potential, take your skills to the highest level and win you the interview and the job you want now? The job market today is highly competitive and even if you think you have what it takes to get an interview you won’t get over the line without a polished, prof
 

Importance of Proper English during Job Interview

Importance of Proper English during Job Interview Your job interview is crucially important and it will determine whether or not you will get the job Depending on the type of job you re going for it is very important for you to use proper English In most cases jobs which offer higher salaries will h
 

How Ajax Can Become as User Friendly as Flash

How Ajax Can Become as User Friendly as Flash There are a number of reasons why Flash has become so popular on the web today and this lies in the fact that users don t have to reload the page Products such as Flash Remoting will allow users to access the background server and Ajax can do the same th
 

Getting Scholarships Online

Getting Scholarships Online The Internet has become the latest tool in the search and acquisition of scholarships While libraries have traditionally been a source of information the Internet has a number of key advantages The first of these advantages is the ability to store large amounts of informa
 

Online Student Loan Consolidation

Online Student Loan Consolidation It is very important for you as a college student borrower to fully know the benefits and advantages of applying online for a student loan consolidation Definitely if you apply for student loan consolidation through the Internet the usually difficult consolidation p
 

HR Interview - HR Interview Mistakes You Will Want To Avoid

HR Interview Mistakes You Will Want To Avoid The job interview can be a stressful process This is especially true for those who are going after a competitive position Your nonverbal communication combined with the answers you give during the interview will determine if you are hired mosgoogle While
 

HR Interview - Behavioral HR Interviews

Behavioral HR Interviews As the name implies a behavioral interview is an interview that is held by a human resources department to determine if an applicant has the behaviors that are appropriate for a job The company must know how an applicant will behave in a certain situations mosgoogle The logi
 

About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape