PersonBeanremote - remote interface for PersonBean
stupidremote - remote interface for stupid provided by another party
PersonBean - impl class of PersonBeanremote .
//remote interfaces.
newRemote extends PersonBeanremote,stupidremote{}
//For implementation classes
make a newBean extend PersonBean and inside this class just implement
methods of stupidremote .
Thats it, your original clients(for personbean) will be able to access
as usual. While passing it to KillStupidThingsWithAGun you don't even need
to cast, because of coercion.
Besides changing your deployment descriptor,you don't need to change client
code and no remote interface changes.The only code you write is in
implementation bean newBean.
>
>Thanks for your reply!
>
> >Lets see if i understand you correctly.
> >
>Well, not exactly.
>
> >Lets say there is a 3 party bean b1 and bean you develop as b2.
> >
>Actually, what I have is a bean, say PersonBean with remote interface
>Person. The implementation is up and running in some nice EJB server and I
>have nice clients doing fun stuff with Persons (playing twister or
>whatever).
>
>Now, here comes the notion of killing all stupid persons. So, I have the
>KillStupidThingsWithAGun third party software that I bought from some
>stranger on the street. The third party software expects Stupid objects, an
>interface provided by the vendor.
>
>So to use the KillStupidThingsWithAGun program I want to implement Stupid
>in PersonBean, and extend Person and Stupid into StupidPerson (or having
>the spec make it possible to have both of them as possible interfaces to
>the bean, making Person the default to let the old clients work without
>changes).
>
>The question is; can I keep the clients the way they are, re-deploying
>StupidPerson beans as Person and casting it to Stupid when the new client
>wants to run them through the KillStupidThingsWithAGun program? Do the old
>clients have to know about Stupid and/or StupidPerson?
>
>/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".
>
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
===========================================================================
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".