I'm sorry, I got the spec wrong. It is 6.10.5.
After re-reading my original post, I thought someone would call me on my
mistake. The bean does not *have* to throw RemoteException. The remote
interface methods, however, *do* have to. This causes a client, that uses an
object that implements this interface, to catch RemoteExceptions. Even local
objects.
jim
----- Original Message -----
From: Rickard �berg <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, November 17, 1999 10:05 AM
Subject: Re: Remote Interface Question
Hey
James Cook wrote:
> Sample has to end up throwing RemoteException's because the Bean's
> implementation of these business methods have to throw RemoteExceptions.
(At
> least, this is what my container is telling me at deployment. The spec
> [section 6.2.5] seems to back this up as well.)
Which spec version is that? I'm looking in EJB1.1PR2 and it doesn't have
6.2.5 (6.2 is "Goals", and is same as EJB1.0).
The bean should not have to throw RemoteException, even if it implements
its own EJB-interface ("Sample" in your example). This is standard Java
rules, and should not be changed.
> When I pass a state object to my client (a read-only snapshot) it
implements
> my business interface. I have to catch RemoteExceptions in all of my
client
> code, even though I have a local object.
>
> It seems like a lot of extra work, but I see why it is required. I was
just
> wondering if anyone has come up with a better pattern.
Nope, not really. I wouldn't let my state holder implement the interface
though, for the reason you outline.
/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".
===========================================================================
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".