Let me try to hazard a possible answer. Since you already have a
reference to this particular instance of an entity bean, it does not
make sense to remove this instance using any parameters. You are
thinking in terms of a relational database instead of thinking in terms
of an object. Remember, using a relational database is just one of many
possible ways of persisting an entity bean, not the only one.

Roslan Amir.

Jonathan Baker wrote:
>
> Raj:
>
> That is also a good question!  I'm not sure why, but I do think it is a hole
> in the specifications here.
>
> Jonathan
>
> Raj Sekhar wrote:
> >
> > Jonathan,
> >
> > Thanx for the reply. U r saying that remove method
> > will only applicable to one instance.. its well and
> > good But my question is...
> >
> > Why did not EJB specification provide any method which
> > deletes records based on a condition like a finder
> > method is taking a parameter and it is returning
> > Enumeration or Collection object.
> >
> > Thanx in advance
> >
> > Raj
> >
> > --- Jonathan Baker <[EMAIL PROTECTED]> wrote:
> > > That is because remove() operates on the particular
> > > instance.  For example,
> > > in Entity beans, if you call remove() you will be
> > > deleting the specific
> > > entity on which it is called.  Since you can't be
> > > talking to more than one
> > > instance at a time, you can't delete more than one
> > > at a time.
> > >
> > > If you want to have a 'mass deletion' routine, I
> > > would put it in a Session
> > > bean.  That bean could take all of the parameters
> > > required for the delete,
> > > and then perform a delete as a single line of SQL.
> > >
> > >
> > >
> > > Jonathan Baker
> > >
> > >
> > >
> > >
> > > Raj Sekhar wrote:
> > > >
> > > > hi all,
> > > >
> > > > we have multiple finder methods, where u can have
> > > > multiple ejbObjects as the return type. And we
> > > have
> > > > remove method also in home interface, but if i
> > > want to
> > > > remove more than one bean from the container it's
> > > not
> > > > possible,since the specification did not mention
> > > > regarding that functionality.
> > > >
> > > > my question is..
> > > >
> > > > What could be the problem if they defined multiple
> > > > delete methods in the Home interface?  Is that a
> > > > performance issue or any design stratagy?
> > > >
> > > > thanx in advance
> > > >
> > > > bye
> > > >
> > > > Raj
> > > >
> > > > __________________________________________________
> > > > Get personalized email addresses from Yahoo! Mail
> > > - only $35
> > > > a year!  http://personal.mail.yahoo.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".
> > >
> > > --
> > > Jonathan Baker
> > >
> > > Senior Architect
> > > Internet Applications Division
> > > Sybase, Inc.
> > >
> > > [EMAIL PROTECTED]
> > > +1 510 922-0460
> > >
> > >
> > ===========================================================================
> > > 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".
> > >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Yahoo! Auctions - Buy the things you want at great prices.
> > http://auctions.yahoo.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".
>
> --
> Jonathan Baker
>
> Senior Architect
> Internet Applications Division
> Sybase, Inc.
>
> [EMAIL PROTECTED]
> +1 510 922-0460
>
> ===========================================================================
> 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