It should throw an IllegalArgumentException because the tx should not be null.
The problem there is that cache.lock() is invoked outside of the scope of a transaction.
On 5 Apr 2013, at 00:06, Sanne Grinovero wrote:
Should this error message not say the opposite?
Caused by: java.lang.IllegalStateException: This is a tx cache!
at
org.infinispan.context.TransactionalInvocationContextContainer.createInvocationContext(TransactionalInvocationContextContainer.java:112)
at
org.infinispan.context.TransactionalInvocationContextContainer.createInvocationContext(TransactionalInvocationContextContainer.java:107)
at org.infinispan.CacheImpl.getInvocationContextForWrite(CacheImpl.java:465)
at org.infinispan.CacheImpl.lock(CacheImpl.java:561)
at org.infinispan.CacheImpl.lock(CacheImpl.java:546)
at
org.hibernate.search.infinispan.impl.indexmanager.RoutingArbiter.failoverCheck(RoutingArbiter.java:93)
at
org.hibernate.search.infinispan.impl.indexmanager.RoutingArbiter.onViewChange(RoutingArbiter.java:81)
at sun.reflect.GeneratedMethodAccessor94.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.infinispan.notifications.AbstractListenerImpl$ListenerInvocation$1.run(AbstractListenerImpl.java:212)
... 31 more
Sanne
_______________________________________________
infinispan-dev mailing list
infinispan-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Cheers,
--
Mircea Markus
Infinispan lead (
www.infinispan.org)