Hi!

Frank Sauer wrote:
> You're right, it doesn't have to throw RemoteException, but it can't
> throw any other exceptions either. I always thought (correct me if I'm
> wrong) that the implementation could throw any exception which in turn
> would get wrapped in a RemoteException for transport to the client. But
> if my interface only specifies RemoteException, then that's the only one
> I'm allowed to throw. Is that correct?

That doesn't make much sense to me. Yes, if RemoteException is the only
defined exception in a throws clause then that is the only type of
exception that can be thrown.

But, if you need application exception (=checked exceptions), why don't
you simply add these to the throws clause in the remote interface?

Interfaces is a means to define a contract. If you ignore that contract
by throwing RemoteExceptions which wrap other exceptions you don't gain
any extra information from the interface (as far as exceptions are
concerned).

Why would you want to have such a design/implementation??

/Rickard

--
Rickard �berg

@home: +46 13 177937
Email: [EMAIL PROTECTED]
Homepage: http://www-und.ida.liu.se/~ricob684

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to