Hello,
I have been following this conversation for a while and I am wondering
whether the following solution would be efficient:
* using BMP entity beans with no "setXXX" methods
* before going to the database to retrieve the rows, check if the
entity bean properties are NULL. If they are, load them from the
database, if they are not, assume they have already been loaded and
use them without going to the database.
This way the entity bean only goes to the database once in its life-time and
it can serve a number of clients. The assumption of course is that your data
is static and will not change without re-starting the server.
Is there something wrong with this approach?
The reason I am not convinced with using session beans to access read only
data is that the session bean will have to go to the database for every
call. Is this not a performance hit?
Michael
>From: Frank Sauer <[EMAIL PROTECTED]>
>Reply-To: A mailing list for Enterprise JavaBeans development
><[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Re: Modelling Read Only Database Tables
>Date: Mon, 22 Nov 1999 07:34:06 -0500
>
>Using entity beans will make the performance much worse...
>retrieving the data from stateless session beans is the
>right way to do it for this scenario.
>
>Frank
______________________________________________________
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".