GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Interview Questions  >  J2EE  >  EJB
Go To First  |  Previous Question  |  Next Question 
 EJB  |  Question 44 of 175    Print  
If i throw a custom ApplicationException from a business method in Entity bean which is participating in a transaction, would the transaction be rolled back by container. Does container rolls back transaction only in case of SystemExceptions

Answer posted by Mohan on 2005-05-21 17:21:54: yes the rollback will occur



  
Total Answers and Comments: 3 Last Update: October 25, 2006   
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
May 21, 2005 17:21:54   #1  
Mohan        

RE: If i throw a custom ApplicationException from a business method in Entity bean which is participatin...
yes the rollback will occur
 
Is this answer useful? Yes | No
June 30, 2005 15:23:43   #2  
Denis Wang        

RE: If i throw a custom ApplicationException from a business method in Entity bean which is participatin...
For declarative transactions, container will rollback on systemException. Container has no way to know whether a speicific application exception is serious enough to roll back the participated transaction. Use setRollbackOnly() to doom the transaction.
 
Is this answer useful? Yes | No
October 25, 2006 17:27:45   #3  
hari ambati        

RE: If i throw a custom ApplicationException from a bu...
We need to call explicitly.setRollback() Method to roll back the transaction in this. Container calls this automatically in case of system exception or system crashes.
 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 




About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape