• 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
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

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
 
His brain is the size of a cherry pit! About the size of this ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic