Andrea Boriero Yes, I did list that as an option but as I started playing with this I realized a problem with that - we do not always know the complete boundary of that call. I thought of another option (hack?) where the Session itself could act as the CacheTransactionContext if there is not one, something like:
class SessionImpl ... implements CacheTransactionContext, ... {
...
@Override
public CacheTransactionContext getCurrentCacheTransactionContext() {
return explicitCacheTransactionContext != null
? explicitCacheTransactionContext
: this;
}
@Override
public long getCurrentTransactionStartTimestamp() {
return lastTransactionJoinTimestamp;
}
...
}
|