이 콘텐츠는 선택한 언어로 제공되지 않습니다.
15.4.3. Configuring Infinispan Query for JBoss Data Grid
The following procedure shows how to set up a simple configuration for using Infinispan Query with JBoss Data Grid.
- Enable the Infinispan Query default configuration and cluster-replicated index for JBoss Data Grid's Query Module, using either
"default"
or specifying the name of an index. The default configuration does not enable any form of persistence for the index.hibernate.search.[default|<indexname>].directory_provider infinispan
hibernate.search.[default|<indexname>].directory_provider infinispan
Copy to Clipboard Copied! Toggle word wrap Toggle overflow It is possible to use multiple named indexes, so configuration can be applied to all or overridden in a per-index base by using the index name.In order to enable a persistent index, either a JBoss Data Grid configuration file must be provided, or point to JNDI as described in Step 2. - Infinispan Query requires a
CacheManager
, which can be obtained in two ways.- Look up and reuse an existing
CacheManager
programmatically using Java Naming and Directory Interface (JNDI). To use this method, the following property must be set in addition to the property specified in Step 1:hibernate.search.[default|<indexname>].infinispan.cachemanager_jndiname = [jndiname]
hibernate.search.[default|<indexname>].infinispan.cachemanager_jndiname = [jndiname]
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Start and manage a new
CacheManager
. To use a newCacheManager
apply the following:hibernate.search.[default|<indexname>].infinispan.configuration_resourcename = [infinispan configuration filename]
hibernate.search.[default|<indexname>].infinispan.configuration_resourcename = [infinispan configuration filename]
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
If both parameters are defined, the JNDI will be prioritized.If neither of these parameters are defined, Infinispan Query will use the default JBoss Data Grid configuration included inhibernate-search-infinispan.jar
, which does not store the index in a persistent cache store.
Specific methods, classes, and packages for this feature are unsupported in JBoss Data Grid, and should not be used. For a full list of prohibited methods, classes, and packages for this feature, see the "Prohibited Classes, Methods, and Packages" section of the JBoss Data Grid 6.1 Release Notes.
Important
The Query Module is currently only available as a Technical Preview for JBoss Data Grid 6.1.