infinispan/infinispan — pull request #1345 by anistor (2012-09-27 14:43:28+00:00)
Title: ISPN-2142  APPLY_STATE in StateTransferControlCommand uses an InvocationContext having local=true

JIRA: https://issues.jboss.org/browse/ISPN-2142

* Fix StateConsumerImpl to use a remote context instead

* BaseReIndexingTest must use builder.indexing().enable().indexLocalOnly(false) otherwise descendant test classes make no sense after fixing apply state context

* Added subclasses for StateTransferQueryDistributedIndexTest, PersistentStateTransferQueryDistributedIndexTest, SharedCacheLoaderQueryDistributedIndexTest in order to test also with indexLocalOnly=true and a distributed infinispan index

* Update list of dependent issues for disabled test SharedCacheLoaderQueryIndexTest and SharedCacheLoaderQueryDistributedIndexTest

* Call QueryInterceptor.updateKnownTypesIfNeeded() even for updates that are not local. This ensures that all types for data received via state transfer are known even if the index is distributed and nothing was actually indexed locally and will prevent eventual "org.hibernate.search.SearchException: There are no mapped entities. Don't forget to add @Indexed to at least one class" when doing queries.

* Cleanup QueryInterceptor/LocalQueryInterceptor.injectDependencies()