Hey
"Lahooti, Hamid" wrote:
> >It should be able to afford to keep a specified number of instances
> >alive in a so-called active pool. In WLS 4.5.1 you can set the size of
> >this pool with the "maxBeansInCache" setting.
>
> I have this set to 100. According to their Web page though, "this
> cache is for active and inactive beans and that after a timeout,
> the inactive beans may be passivated. An inactive bean is one that
> is not in a current transaction and not subject of an invocation".
Sounds right to me.
> The point I am making is that two ejb objects (with two primary keys)
> are associated with the same bean instance at different points in time.
Correct, and likely.
> This indicates that the container returns the instance to the free
> pool once the first transaction completes and then takes out of the
> free pool and re-associates with the second ejb object when the second
> transaction starts. Sorry if I seem to have gone on a bit here.
Have you done println statements in ejbPassivate and checked that they
are called after each transaction? I think you will find that this is
not the case.
A particular instance associated with a particular primary key will be
passivated if "left alone" long enough, and will then be passivated
after which this particular instance may be reused for serving other
primary keys(/objects).
If you can make a testcase in which you start a transaction, use a bean,
commit the transaction, and the bean is *immediately* passivated I would
be surprised. Can you do this?
/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".