A direct existence query is useful if there is reasonable confidence
that the entity is not already activated. If the instance is in the
pool, then you may find it easier and faster to call findByPrimaryKey().
An advantage of a direct EXISTS query is that it avoids transmitting the
record back to the client.

Fred Loney
Spirited Software, Inc.
www.spiritedsw.com


----- Original Message -----
From: "Nikhil sharma" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, November 28, 2001 7:47 PM
Subject: ByPassing Entity Beans to check for record existence ?


> It is normally a practice to bypass entity beans in case multiple
> records need to be
> fetched from the database.=20
>
> So I wanted to know whether it is suitable to even by-pass the entity
> beans to check if a=20
> record exists in database by directly accessing database from session
> beans. and not calling
> the findByPrimaryKey() method for that purpose ?
>
> TIA,
> Nikhil.
>
>
========================================================================
===
> 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