"Andy L. Czerwonka" wrote:

> Question.  The bean class implements the bean's functionality.  The remote
> interface defines the interface.  Why doesn't the bean class implement the
> remote interface?  I must have methods presented in the remote interface,
so
> why doesn't it just implement it?
>

Mark replied:

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

Andy,

Also beware that while the EJB spec permits a bean class to implement its
remote interface, not all EJB implementations support it (WebLogic doesn't).

Stu Halloway
DevelopMentor

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