One could argue that this is a pretty pointless discussion, since home
interfaces are part of the standard and will remain there for sure. Anyway,
if you look at the EJB2.0 draft, you'll see that the home interface has in
fact been extended to allow business methods to be defined there in addition
to the methods for life cycle management. In my opinion, this is a very good
extension because it gives methods that belong in the same component as the
entity bean, but operate on more than one instance, a natural ... well, home
;-)

____________________________________________________________________
Stefan Tilkov -- stefan(dot)tilkov(at)innoq(dot)com -- www.innoQ.com


> -----Urspr�ngliche Nachricht-----
> Von: A mailing list for Enterprise JavaBeans development
> [mailto:[EMAIL PROTECTED]]Im Auftrag von Harish Vajha
> Gesendet: Donnerstag, 17. August 2000 17:20
> An: [EMAIL PROTECTED]
> Betreff: Re: A newbie question: why home interface is needed?
>
>
> > Rick Hansen wrote:
> > >
> > > One obvious utility of ejb homes is the finder methods. If
> the container
> did
> > > it all we might end up with only findByPrimaryKey finders.
> >
> > It would be worse than that. With no factory/home, the container
> > wouldn't be able to tell if we wanted a create or a find!
>
> May be not! We could always have had that as a part of the remote
> interface!
> Look at it this way: Push in everything (all the methods) into the remote
> interface and have one global home(the factory object that reps. the
> container) which will give us a ref. to an RI and then we could
> do whatever
> operations we do now on the home, then on the remote.
>
> In my understanding the point could be more of separating the two
> different
> tasks : "creation/finding" and "business methods" into two different
> interfaces.  The home interface will do all these life-cycle
> related things
> and the RI does just  "business". :)
>
> pl. correct me if i'm wrong,
> Harish
> >
> > > Rick Hansen
> > >
> > > >-----Original Message-----
> > > >From: David Chen [mailto:[EMAIL PROTECTED]]
> > > >Sent: Tuesday, August 15, 2000 2:03 PM
> > > >To: [EMAIL PROTECTED]
> > > >Subject: Re: A newbie question: why home interface is needed?
> > > >
> > > >
> > > >> The container will generate an implementation of your home
> > > >interface which
> > > >*is* an
> > > >> EJBObject factory.
> > > >
> > > >Thanks Chris. I understand that an implementation will be
> > > >generated. But why
> > > >the interface is needed at the first place. The container
> > > >should not have
> > > >problem to associate the remote interface to the bean
> object. Could the
> > > >client just ask the container to get a reference for a given remote
> > > >interface?
> > > >
> > > >David
> > > >
> > > >
> > > >----- Original Message -----
> > > >From: "Bono, Chris" <[EMAIL PROTECTED]>
> > > >To: <[EMAIL PROTECTED]>
> > > >Sent: Tuesday, August 15, 2000 2:58 PM
> > > >Subject: Re: A newbie question: why home interface is needed?
> > > >
> > > >
> > > >> David,
> > > >>
> > > >> >>>But why the home interface is needed? Could
> > > >> >>>its "create" responsibility be owned by some sort of
> > > >factory object
> > > >that
> > > >> >>>represents the containers?
> > > >>
> > > >> The container will generate an implementation of your home
> > > >interface which
> > > >*is* an
> > > >> EJBObject factory.
> > > >>
> > > >> -----Original Message-----
> > > >> From: David Chen [mailto:[EMAIL PROTECTED]]
> > > >> Sent: Tuesday, August 15, 2000 1:26 PM
> > > >> To: [EMAIL PROTECTED]
> > > >> Subject: A newbie question: why home interface is needed?
> > > >>
> > > >>
> > > >> Could someone tell me why a remote interface and a home
> > > >interface has to
> > > >be
> > > >> created for each ejb bean? I understand that the remote
> > > >interface probably
> > > >> is required since it is undesirable to expose the bean class (with
> > > >> implementation) to the client. But why the home interface is
> > > >needed? Could
> > > >> its "create" responsibility be owned by some sort of factory
> > > >object that
> > > >> represents the containers? And the client just asks it for
> > > >the reference
> > > >to
> > > >> the bean with the remote interface name. It seems to me that it is
> > > >simpler.
> > > >> But I am sure that the home interface probably is required
> > > >and designed to
> > > >> work this way for some reasons that I don't know of. I would
> > > >appreciate
> > > >your
> > > >> thoughts on this.
> > > >>
> > > >> Thanks in advance.
> > > >>
> > > >> David
> > > >>
> > > >>
> > > >===============================================================
> > > >============
> > > >> 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".
> > > >>
> > > >
> > > >===============================================================
> > > >============
> > > >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".
> >
> > --
> >
> __________________________________________________________________
> __________
> ____
> >
> > Evan Ireland              Sybase EAServer Engineering
> [EMAIL PROTECTED]
> >                             Wellington, New Zealand               +64 4
> 934-5856
> >
> >
> ==================================================================
> =========
> > 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".
>
>

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