On pages 265-268 of the toy train book, there is a nice discussion of why
this is designed this way (same as explained by Mark), as well as a description
of a design that allows you to define an interface used by both the bean class
and the remote interface.

tim.

> I'd say that's a bad decision on Sun's part.  A better design would be an
> abstract interface with exceptions thrown during a cast; to catch the error
> you're talking about.
>
> -andy
>
> -----Original Message-----
> From: A mailing list for Enterprise JavaBeans development
> [mailto:[EMAIL PROTECTED]]On Behalf Of MARK HAPNER
> Sent: November 16, 1999 7:21 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Remote Interface Question
>
>
> The main reason for this is to prevent the EJB class from mistakenly
> being called directly rather than through its remote interface. If this
> were done, the container is taken out of the loop - this breaks the
> component model.
>
> EJB allows the class to inherit its remote interface for those who
> prefer this style; it does not require it for the reason above.

===========================================================================
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