• 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
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Himai Minh

Exceptions from Container to Bean?

 
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Exceptions thrown from container to bean or bean to container.

Exceptions thrown from container to bean are all system exceptions only?
Can a container throughs any checked exceptions other than remote exception?

Yamini
 
Ranch Hand
Posts: 379
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by yamini nadella:
Exceptions thrown from container to bean or bean to container.

Exceptions thrown from container to bean are all system exceptions only?
Can a container throughs any checked exceptions other than remote exception?

Yamini



The whole purpose of an exception is for bean clients. Those could be a client or the container. The bean wouldn't make any use of exceptions throws by the container and it would be hard for the container to contact the bean if the container throws an exception. So the bean can throw exceptions, and the container can throw exceptions. In both cases, is the client who needs to know what went wrong on the server side.

Exceptions can be application (the client expected it) or system (the client didn't expect it).

System exceptions are generally wrapped around EJB exceptions: javax.ejb.EJBException if the client is local, java.rmi.RemoteException is the client is remote.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic