Hey Marc,

> I guess I don't see why a reinserted bean needs to behave any 
> differently
> than "normal" beans.  I did code an "update usage" just like 
> when a bean is
> called so that it goes back as a "currently in use" bean and 
> goes out of the
> "LRU" scope

Yes, this is what happens. Sorry if I explained it ambiguously.

> ... is your implementation LRU?

Yes (if not is a bug).

> |If the TX times out, I expect that its TX is nullified (am I 
> right on this
> |in every case - BMT and CMT ?) and when a) or b) eventually 
> happens it is
> |finally passivated.
> 
> Make sure tha the passivation does behave properly, we seem 
> to have problems
> with the timeout in the container right now...

In my tests it seems to behave correctly, for 
a) commit option C 
b) cache full
c) bean overage
Waiting for your results.

> |Nevertheless, this introduce a new problem: the cache can 
> pass its maximum
> |capacity.
> |Say I have cache max capacity 5; I create 5 beans and I 
> leave all their
> |transactions active (so I cannot passivate them). Now I create a
> |6th bean...
> |cannot insert in cache, cannot free space in the cache... what now ?
> |I can set the max capacity to be virtually infinite (ie no 
> max capacity),
> |and since the cache have a resizer that resizes its capacity 
> we would have
> |no problem in *normal* use. Should I do this change in your opinion ?
> 
> good point, I guess the "max size" algorythms have this 
> problem... (Random
> passivation right?).  Again the LRU passivation works fine 
> with this (as I
> update the usage if there is a transaction).  One thing I 
> would do it work
> from the current size of the cache and only 'sweep' once in 
> this fashion you
> won't loop but the map will grow accordingly.  At every 
> iteration you will
> try to passivate but you will reach the end.

Didn't follow you.
The max size problem is there independently of the cache algorithm, isn't it
?
The resizer and the overager work in a thread that isn't the passivator one.
The LRU cache size is a parameter we want to tune, of course. When something
goes out of the cache it is passivated, but what happens if I cannot
passivate it ? In the actual implementation an exception is thrown because
the cache cannot exceed what we wanted to be its max capacity. Do you think
that I should give the caches no max capacity limit ?

Regards,

Simon

Reply via email to