I don't see anything explicit in the EJB 1.1 spec that either prohibits or
allows this.  However, given the fact that Java interface extension is
a relatively benign feature, I would expect that multiple extension is
supported for the Remote interface.

It's also worth noting that Ed Roman publishes an example of just such
a technique in his book "Mastering Enterprise Java Beans" (Wiley).
He uses multiple extension of Remote interfaces in a slightly different
way than you are proposing.  In his example, SomeOtherInterface is
used to ensure that the business interfaces for the Remote Interface
and the Bean class stay in sync with each other.

I've implemented this pattern with BEA's WebLogic Server, and the
container code generation tools or run-time support didn't have any
problems with it.  However, I can't give any assurances that it's any
more widely supported than that.

Hope this helps.

Charlie Alfred
Foliage Software Systems, Inc.

> -----Original Message-----
> From: Frank Gates [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, March 01, 2000 2:33 PM
> Subject: Remote Interfaces extending additional interfaces to EJBObject
>
>
> Hi,
>
> One of our clients wishes to use Remote interfaces that extend a second
> interface to EJBObject.  For example,
>
> public interface someRemote extends javax.ejb.EJBObject,
> someOtherInterface
> {
> ...
> }
>
> The reason is that they want to install two or more Beans with the
> common interface (someOtherInterface) so that they may use that other
> interface to cast the Remote object returned by the create() methods.
>
>
>         someOtherInterface remote = (someOtherInterface) homeBeanA.create ();
>         remote.doSomething ();
>         someOtherInterface remote = (someOtherInterface) homeBeanB.create ();
>         remote.doSomethingElse ();
>
> In searching the spec I cannot see that this use of interfaces is
> allowed for Remote interfaces.  But I also see no clear statement
> forbidding it either.  This might also be a container-specific issue.
>
> Opinions?
>
> Thanks,
>
> Frank Gates
> Interactive Business Solutions, Inc.
>

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