[infinispan-dev] [hibernate-dev] Have Infinispan share Hibernate's TransactionManagerLookup strategy
Sanne Grinovero
sanne at hibernate.org
Wed Feb 2 06:54:24 EST 2011
I'm sorry, this is especially relevant to infinispan-dev, but my
previous CC was bounced.
Sanne
---------- Forwarded message ----------
From: Sanne Grinovero <sanne at hibernate.org>
Date: 2011/2/2
Subject: Re: [hibernate-dev] Have Infinispan share Hibernate's
TransactionManagerLookup strategy
To: Galder Zamarreño <galder at jboss.org>
Cc: Emmanuel Bernard <emmanuel at hibernate.org>, Hibernate
<hibernate-dev at lists.jboss.org>, infinispan -Dev List
<infinispan-dev at lists.jboss.org>
2011/2/2 Galder Zamarreño <galder at jboss.org>:
> Hmmm, I already did a similar thing for Infinispan 2LC a while back:
>
> https://github.com/galderz/hibernate-core/blob/master/hibernate-infinispan/src/main/java/org/hibernate/cache/infinispan/InfinispanRegionFactory.java#L418
Nice, you're taking it from the Settings, I like your approach more.
But be aware of ISPN-883, just solved.
>
> I take Hibernate's TM and hook it into Infinispan. The way I did it is create a HibernateTransactionManagerLookup class that implements org.infinispan.transaction.lookup.TransactionManagerLookup and looks up the transaction manager with Settings.getTransactionManagerLookup().getTransactionManager(properties)
>
> Maybe we should look into consolidating this code?
Definitely; in which project would you store the common
TransactionManagerLookup wrapper?
I would be fine in depending to the second level cache module, I'd
assume that anybody having setup Infinispan and Hibernate would use
the second level cache too, or at least have no issues having to
depend on it being classpath.
We could add a simplified EmbeddedCacheManager constructor to maintain
most of the complexity of building a cache via a configuration but
overriding components via provided instances, this relates to a brief
chat I had yesterday with Vladimir about a forum thread [1]. Maybe
easies way is to expose the GlobalComponentRegistry during the
configuration phase, as overrides for internal components?
1 - http://community.jboss.org/thread/161913?tstart=0
Cheers,
Sanne
>
> Cheers,
>
> On Feb 1, 2011, at 8:17 PM, Sanne Grinovero wrote:
>
>> As discussed, I have been playing with Infinispan's configuration
>> options to have it startup using hibernate's TransactionManagerLookup.
>> It wasn't working initially because of ISPN-883, but this is now
>> solved (thanks Mircea!).
>>
>> I'm not sure yet if this should be pushed to Hibernate Search, but it
>> might be useful to have a look for OGM:
>>
>> https://github.com/Sanne/hibernate-search/commits/InfinispanTransactionManagerLookup
>>
>> it's quite verbose, if you have suggestions I can try pushing some of
>> the complexity into Infinispan, assuming they are fine with it.
>>
>> Sanne
>> _______________________________________________
>> hibernate-dev mailing list
>> hibernate-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>
> --
> Galder Zamarreño
> Sr. Software Engineer
> Infinispan, JBoss Cache
>
>
More information about the infinispan-dev
mailing list