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.
Marco Tedone<br />SCJP1.4,SCJP5,SCBCD,SCWCD