I'm investigating some problems found during a research project. One of the
major downsides, according to the project conclusions, is that one cannot
have multiple interfaces in EJB. According to the spec one can let the
remote interface extend multiple interfaces, but that does not permit one
to let a bean implement a new, possibly third-party, interface without
making changes to the remote interface and the clients using the bean.
Is there any way one can let the bean implement a new interface and have
the clients the way they are? If I for example have a bean with interface
X, the clients look up XHome and receives stubs implementing X. Now I also
want the bean to implement Y, so I extend X and Y into XY (as I understand
is the proposition made in the spec). Can I now let old clients, that want
objects of type X, stay the way they are and just implement clients that
want objects of type Y, or do I need to change the old clients so that
they also know of XY (and thereby also Y) possibly casting to X directly?
These questions arise from the fact that the developers in the project come
from a COM+ background and (from what they have told me) one can specify
what interface one wants returned when looking up an object. Thereby one
can just let old clients be while implementing the new interface on the COM
object.
If it is possible to have the old clients the way they are, I propose the
following changes to the spec. Please comment on the proposal (or even the
possibility to do what I propose):
* The Deployment Descriptor is given the possiblity to specify multiple
interfaces (which only adds to the spec, still making old descriptors
valid).
* The deployment tools are responsible for making a remote interface that
extends all specified interfaces (X and Y are combined into XY which is the
interface returned by the home).
* Optionally one might want to add the possibility to specify one of the
interfaces in the DD as the "main interface", making it the interface
returned by the home. Since it is a superclass to the combined interface I
guess this should work.
Thanks for any comments, big or small.
/Kalle
===========================================================================
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".