• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • paul wheaton
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • Mikalai Zaikin
  • Himai Minh

how to tell application exception from system exception

 
Ranch Hand
Posts: 157
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When a call is made to a single-entity find method in an entity bean, the ObjectNotFoundException is thrown because the requested entity was not found,It is not automatically rolled back because it is an application exception , instead of system exception .
my question is how to tell application exception from system exception ?
 
Ranch Hand
Posts: 2713
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For these types of questions it is always best to look to the EJB Specification for the answer. It has the following to say about Application Exceptions:

From Section 18.1.1 of the EJB 2.0 Specification
An application exception class must be a subclass (direct or indirect) of java.lang.Exception. An application exception class must not be defined as a subclass of the java.lang.RuntimeException or of the java.rmi.RemoteException.


Therefore, a System Exception is a RuntimeException, RemoteException, or subclass of either. An Application Exception is anything else.
CreateException, RemoveException, FinderException, and ObjectNotFoundException are all Application Exceptions. EJBException is a System Exception.
BTW, this is getting too detailed for the SCEA exam.
[ February 09, 2003: Message edited by: Chris Mathews ]
 
Cob is sand, clay and sometimes straw. This tiny ad is made of cob:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic