"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.
This behaviour is exhibited by WebLogic Server 4.5.1 but I don't agree
it is necessarily a bug as the ejb spec does not require the server
to maintain the association between ejb object and the bean instance
other than for the duration of a transaction. At least, that's my
understanding.

>Activation/passivation are possibly expensive operations, and if my
>EntityBeans were passivated after *each* transaction the performance
>would be incredibly poor.
Indeed. We looked at this option and ruled it out for that reason.

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

===========================================================================
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