What happens if I declare a custom Exception and throw it in the method of an EJB. Will it reach my client if it calls the EJB remotely? Or will a remote exception be throw in such a case?
Joined: Jan 09, 2008
hi nitin It depends whether your exception is a checked or unchecked exception . In case of checked exception it will reach the client , in case of unchecked it will be considered as system exception and a EJBException will be sent to the client. However we can have a unchecked exception propagate to client as it is by marking it with @ApplicationException .