Hey
Michael Pikounis wrote:
> 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?
Sounds like a rather working object cache to me. Thumbs up. :-)
> 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?
Yep. In the above setup you will have memory-only accesses (no HD reads,
no network calls), so it should be rather effective. Try using
TX_NOT_SUPPORTED as transaction setting too.
/Rickard
--
Rickard �berg
@home: +46 13 177937
Email: [EMAIL PROTECTED]
Homepage: http://www-und.ida.liu.se/~ricob684
===========================================================================
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".