Rickard wrote:
> Sideeffect: beans can implement Account, thus ensuring consistency
> between interface and impl.
You can do this now (though some EJB Server deployment tools use
getDeclaredMethods() and have some problems handling it properly).
Just put all your business methods in a different interface:
// Written by bean developer
interface AccountBiz
{
long getBalance();
...
}
and then let the bean interface extend both EJBObject and the Biz
interface as follows:
interface Account extends AccountBiz, EJBObject
{
}
The bean implementation can then implement AccountBiz and let the
compiler do the consistency checking for you.
> Comments? This is an incompatible change to the existing interfaces, but
> it has some very nice effects IMHO, including making it possible to
> implement EJB over plain JDK-RMI(/w JRMP).
I think it is impractical for just the reason that it is a serious
incompatibility with the current spec. I don't think you will see the
requirement for EJBObject to extend Remote being dropped any time
in the near term.
However, since java.rmi.Remote is just a marker interface (with no
method signatures), having it in the inheritance chain for the interface
should not prevent you from doing the things you want. What might be
better is to change EJBObject so that it also implements Serializable
and thus allows you to pass around the stubs at will over the wire.
...Andrzej, Chaeron Consulting Corporation
Chaeron: - http://www.chaeron.com
Sightings - http://www.chaeron.com/sightings/
===========================================================================
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".