Hey

"Lahooti, Hamid" wrote:
> >* 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 would work only if you could get the container to
> keep the bean instance active. In practice, you cannot
> and the container will passivate the instance as soon as
> the transaction completes so you cannot really use this
> method for a singleton cache.

Which EJB-server does this? I would consider this to be buggy behaviour.

Activation/passivation are possibly expensive operations, and if my
EntityBeans were passivated after *each* transaction the performance
would be incredibly poor.

What *would* be ok is if it considered the state of the instance to be
invalidated so that a ejbLoad would be issued upon a new transaction.
But that's an entirely different thing, and which is what Michaels
workaround would help control better.

/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".

Reply via email to