Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS forum!
  • 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
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

HFEJB - pg 564 - Exceptions: question 4.

 
Ranch Hand
Posts: 290
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi folks, i have a question regarding question 4.

OPTION B: Beans methods should wrap unrecoverable checked exceptions in a javax.ejb.JBException.

for me "unrecoverable checked exceptions" means :
- RemoteException and its Sublclasses such as:
- NoSuchObjectException
- TransactionRequiredException
- TransactionRolledbackException

First, does it make sense?

Second, if the first question is correct...why should i be wrapping the execptions above in a EJBException ? Besides, why should i be wrapping the execptions above in a EJBException if the client was a remote client??

Please guys advice!!!

Tks so much!!!
 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Felipe
To me Unrecoverable checked exception means not only remote exception it can be any checked application exception from which the bean method could not recover. so if such exception occur the client can't do anything in catch block so as to avoid handling the exception at client end the bean method wraps that exception in javax.ejb.EJBException and throws that to container & depending upon the client is local or remote the container throw back the EJBException or RemoteException...
 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In HFEJB, page 543 and 546 have your answer
 
sunglasses are a type of coolness prosthetic. Check out the sunglasses on this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic