Originally posted by Anup Katariya:
If my remote interface method is throwing some exception ( i.e public String getString() throws SomeException; ) then do i need to put that throws clause in my bean method ?
please justify the answer.
It's up to you. If you wnat to handle your method's exceptions inside the bean, you do not need to throw this exepion "forward". For example in bean's method:
There is no any throws.
But, as for me, it is better practice to throw on your server exceptions to client via
throws clause and to handle this exceptions on the client side:
where
YourServerException is your exception class that
extends Exception and, of course,
implements java.io.Serializable But anyway, it's up to you to choose one of this ways.
Regards.