Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

RemoteException in EJB

 
Ranch Hand
Posts: 333
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can the bean itself throw a RemoteException?. According to HFE, if the bean throws a system Exception(unchecked/runtime), then the container gets the exception and throws to the client as a "RemoteException". So , here the container is throwing the RemoteException.
 
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Can the bean itself throw a RemoteException?


NO. According to the specification, the bean itself cannot throw RemoteException.

If the bean is serving a local client and throws a system exception, the container will wrap it into EJBException, and rethrows this to the client. If the bean is serving a remote client and throws a system exception, the container will wrap it into RemoteException, and rethrows this to the client.


According to HFE, if the bean throws a system Exception(unchecked/runtime), then the container gets the exception and throws to the client as a "RemoteException". So , here the container is throwing the RemoteException.


YES. This is exactly what the container does.

Nick
 
I love a woman who dresses in stainless steel ... and carries tiny ads:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic