----- Original Message -----
From: "Kenneth D. Litwak" <[EMAIL PROTECTED]>
> In the EJB code I've seen, business methods are declared in the remote
> interface as throwing a RemoteException. The corresponding mehtod in the
bean
> class is not declared to throw a RemoteException. My question has two
parts.
> FIrst, why is it that some business methods in the remote interface seem
to be
> declared as throwing a RemoteException but others are not?
Like you said, *ever* method in the remote interface (and home interface)
must throw RemoteException. The corresponding method in the bean does not
have to explicitly throw RemoteException, because the bean class does not
*implement* the remote interface. The spec goes as far as saying that the
beans methods should not throw a RemoteException, but this is very
shortsighted when a bean's method makes a call to another bean. You would
have to manually catch every RemoteException possibility and rethrow it as
an EJBException. Many of us consider this to be very pedantic behavior.
> Second, why would I
> get an error running the RI Verifier that says that a method declared
like
> this:
>
> public String createAccount(String name) throws RemoteException
> throws the RemoteException improperly? Since this is just a
declaration, and
> it compiles okay, how can it be wrong, since the implementation is done in
the
> EJBOBject class made by the container? Thanks.
If this is the declaration of a method in your bean method then the verifier
(what is RI verifer?) is being pedantic. It is in accordance to the spec,
but the spec poorly considers intra-bean communication.
jim
===========================================================================
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".