[hibernate-dev] [infinispan-dev] [ISPN-6] COMMITTED tx status handling changed from JBC to ISPN

Manik Surtani manik at jboss.org
Tue Aug 18 11:08:26 EDT 2009


On 18 Aug 2009, at 15:50, Galder Zamarreno wrote:

> Hi all,
>
> More stuff related to the infinispan cache provider. The way we deal
> with transactions that are not ACTIVE or PREPARING has changed from
> JBoss Cache to Infinispan.
>
> In JBoss Cache, TransactionTable.getCurrentTransaction() logged a
> message if the transaction's status was committed whereas Infinispan
> simply throws an IllegalStateException if the status is neither ACTIVE
> nor PREPARING.
>
> This change of behaivour is making Infinispan cache provider tests  
> that
> do bulk modifications to fail. The reason it fails is because  
> Hibernate
> has a javax.transaction.Synchronization implementation called
> CacheSynchronization that in it's afterCompletion(), it leads to call
> BulkOperationCleanupAction.evictEntityRegions() which clears the cache
> for the affected entities. Now, since the tx status is COMMITTED, the
> test fails.

Surely though, at that stage the tx has already committed (and hence  
the name of the callback - afterCompletion()).  If anything,  
operations here should happen outside the scope of the tx.

Can't the cleanup call happen in beforeCompletion(), after any  
Hibernate resources have performed their beforeCompletion() steps?

> Would there be any problems in maintaining the previous logic?

While I don't have any problems reverting to the older logic, I just  
feel that doing so hides bugs elsewhere.

Cheers
--
Manik Surtani
manik at jboss.org
Lead, Infinispan
Lead, JBoss Cache
http://www.infinispan.org
http://www.jbosscache.org







More information about the hibernate-dev mailing list