[hibernate-dev] On 2nd level cache and requirements off the cache implementor

Galder Zamarreño galder at redhat.com
Fri Apr 11 09:25:04 EDT 2014


The reason Infinispan currently uses transactions and forces JTA transactions, for any clustering mode that requires entity updates, is because the need to rollback contents if they’re partially applied in the cluster. Without transactions, we do not have the capabilities to rollback changes if only half of the nodes apply the update.

On 04 Apr 2014, at 20:13, Sanne Grinovero <sanne at hibernate.org> wrote:

> Both Ehcache and Infinispan support transactions, but Ehcache doesn't
> use this capability when running as Hibernate 2nd level cache, while
> Infinispan uses it more as an implementation detail to provide
> internal consistency, and not to participate with the application
> transaction.

^ Not sure what transactions you area talking about there, whether Hibernate or JTA transactions, but Infinispan does participate in the on-going JTA transaction that the application is running, when the mode is transactional. It interacts with the transaction manager via synchronizations.

> 
> So I think that the fact they both happen to also support Transactions
> should be considered incidental.
> 
> I'd very interested too to hear from Galder and Alex about the
> required atomic operation they build on. I could look at the code but
> I'm primarily wondering of what they'd rather need conceptually, than
> knowing what they are forced to do today.
> 
> Sanne
> 
> On 4 April 2014 14:27, Emmanuel Bernard <emmanuel at hibernate.org> wrote:
>> This is brain storming at this stage.
>> 
>> How much is required of a cache provider as far as semantic is
>> concerned and be cluster safe? The only providers we currently offer are EhCache and
>> Infinispan
>> http://docs.jboss.org/hibernate/orm/4.3/manual/en-US/html_single/#performance-cache
>> 
>> But both happen to be transactional so I wonder if that's a requirement
>> and if not what are the list of atomic operations that a clustered cache
>> provider would need to offer.
>> 
>> Any hint and feedback appreciated :)
>> 
>> Emmanuel
>> _______________________________________________
>> hibernate-dev mailing list
>> hibernate-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/hibernate-dev


--
Galder Zamarreño
galder at redhat.com
twitter.com/galderz




More information about the hibernate-dev mailing list