File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Object Relational Mapping and the fly likes [persistence EJB3] which exceptions should I handle Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Object Relational Mapping
Reply Bookmark "[persistence EJB3] which exceptions should I handle" Watch "[persistence EJB3] which exceptions should I handle" New topic
Author

[persistence EJB3] which exceptions should I handle

Alessandro Ilardo
Ranch Hand

Joined: Dec 23, 2005
Posts: 218
Hi there,
I'm using a stateless EJB3 bean to manage my pojo.
My question is: in a J2EE web application, which exceptions should be handled in this kind of bean?

Thanks in advance


trying to decode a woman mind....
Erik Bengtson
Ranch Hand

Joined: Dec 06, 2003
Posts: 90
You can let the container rollback the transaction in case of exceptions, so your answer can be just "None". :-)
Alessandro Ilardo
Ranch Hand

Joined: Dec 23, 2005
Posts: 218
I'm new with EJB3 and Enterprise beans, I need some more details. For example, let's say I've got a method which is available on the interface and it returns all my users from the database. The signature hasn't any throws declaration, what would happen if somehing goes wrong??

Thanks again
Erik Bengtson
Ranch Hand

Joined: Dec 06, 2003
Posts: 90
A RuntimeException is thrown
 
 
subject: [persistence EJB3] which exceptions should I handle
 
Threads others viewed
Lazy loading exception in presentation layer, what's the nicest way to avoid them?
Whizlabs Exam Simulator
To those that Passed with 80% or above
Cleared SCBCD-5 with 90%
Cade component diagram and DAO
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com