| Steve Ebersole I think I agree with all the points above; I don't get what was the problem with timestamps, but the actual implementation seems fine to me. One point that wasn't clear before is what you mean by 'CTC being aware of transaction boundaries' - if the only thing is that it registers itself as a synchronization (if needed), I am absolutely fine with that. I thought you wanted it to track 'what's the current transaction', which does not seem to be the case. A case that is not currently handled is a transaction suspend/resume - the former should null AbstractSharedSessionContract.cacheTransactionContext and the latter should set it to the CTC belonging to the previously suspended transaction. The wording on SharedSessionContractImplementor.getCurrentCacheTransactionContext() is too vague saying "may return null" - IMO it must return null when no transaction is associated and it may return null if we're in tx and RegionFactory.startingTransaction returns null (that should be stated as legal variant if the impl doesn't want to implement anything fancy). |