Anurag,
Hello. Have u tried deploying it. I have tried it and it just
doesnt work. The reason is Base Home Interface will return the remote ref.
to Base Remote Int. and not to the derived remote Intf. This gives a
problem becoz there is a file called BeanHomeImpl.java which is generated
by the Container and this class implements the home intf. and returns the
ref. to derived remote intf. So the bean will not get deployed only..U try
installing it and u will understand it....
On Mon, 21 Feb 2000, anurag mandloi wrote:
> I don't agree with this explanation. There is no problem with initial
> design. For example-
> BaseHome is the base interface for InheritedHome1 and InheritedHome2.
> Whenever you receive an instance of InheritedHome1/2, it is legal to type
> cast it into BaseHome.
>
> -Anurag
>
> >From: Prateek Asthana <[EMAIL PROTECTED]>
> >Reply-To: A mailing list for Enterprise JavaBeans development
> ><[EMAIL PROTECTED]>
> >To: [EMAIL PROTECTED]
> >Subject: Re: polymorphism implementations with beans. would it work ?
> >Date: Tue, 22 Feb 2000 02:40:06 +0530
> >
> >Hed,
> > What I have got from ur mail is U are creating a remote interface X
> >which is inheriting from another remote interface Y.
> > Now i guess u are also inheriting the home interface X from home
> >interface Y. Now once u are inheriting u cannot override the function
> >signatures of create() belonging to home interfaceY in home interface X. So
> >ur
> >home interface X consists of its own defined create functions and also the
> >ones
> >inherited from home interface Y. The home interface Y consists of create
> >functions returning reference to remote interface Y. Becoz of the home
> >interface Y consisting of create functions returning reference to remote
> >interface Y this model work not work, the bean will not even get deployed.
> >So
> >there is no quetion of type casting at all arising if bean itself is not
> >getting deployed. In short u can inherit remote interfaces but dont try to
> >inherit from home interfaces returning ref. to another type of remote
> >interface.
> >If u find any other thing in this regard then pl. inform me.
> >
> >Prateek.
> >
> >Hed Bar-Nissan wrote:
> >
> > > i want to have polymorphism with beans.
> > >
> > > for that i have two beans which their remote interfaces extends a base
> > > interface.
> > > ( i hope this would work fine. tried with a test demo and it worked o.k
> > > my problem is with the creation of the home interface )
> > >
> > > Another problem is with the creation of the home.
> > > A home = (A) obj;
> > > after creation i have to do a casting to an interface that all
> > > homeinterfaces extends which contain the ceate().
> > >
> > > would that work as well?
> > > any pitfalls ?
> > > is everything i do legal ?
> > >
> > > hed
> > >
> > >
> >===========================================================================
> > > 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".
> >
> >===========================================================================
> >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".
>
Regards,
Prateek.
===========================================================================
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".