Darius Davidavicius wrote:
> >That's for a second call to fBPK in the same transaction right?
> 
> i was just thinking....
> 
> i hope it works like:
> 1.
> 
> Transaction1 -> fBPK -> DataBase calls
> Transaction1 -> fBPK -> no DataBase calls
> commit

Correct.

> 2.
> Transaction1 -> fBPK -> DataBase calls
> commit;
> Transaction2 -> fBPK -> no DB calls
> commit;

Correct.

> 3.
> Transaction1 -> fBPK -> DataBase calls
> Transaction2 -> fBPK -> ??? i dont have ideas, it can be DB load; or notFound 
>exception
> commit 1;

This depends on how the cache is implemented. With the current cache
(which uses pessimistic locking) you would get no DB calls for TX2.

With an optimistic cache Tx1 and Tx2 would be completely separate so an
Entity active in Tx1 is not seen by Tx2.

> Transaction2 -> fBPK -> no DB calls
> commit 2;
> 
> does it work like i think ?

Yes.

-- 
Rickard Öberg

Email: [EMAIL PROTECTED]


--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to