• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic