JBoss Community Archive (Read Only)

Teiid 9.0 (draft)

Infinispan-DSL Data Sources

Infinispan-DSL data sources use a Teiid specific JCA connector that is deployed into Wildfly 9.0.2 during installation. This connector can be configured to support the following modes of Infinispan caches that will be accessed using the Hot Rod client:

Cache Type

Property Name

Obtain Cache By

Remote Cache

CacheJndiName

using JNDI

Remote Cache

RemoteServerList

Server list, specify 1 or more host:port's

Remote Cache

HotRodClientPropertiesFile

HotRod client properties file

Requirement

Minimum, Infinispan 6.0.1 (JDG 6.2) that is configured to use Google Protobuf for object serialization. This will enable Teiid to use DSL query language to perform searches on the cache as if it was a local cache configured with Lucene indexes.

Configuration

The following are the properties that can be configured for this connector:

Property Name

Req.

Property Template

Description

CacheTypeMap

Y

cacheName:className[;pkFieldName[:cacheKeyJavaType]]

For the indicated cache, map the root Java Object class name. Optionally, but required for updates, identify which class attribute is the primary key to the cache. Identify primary key java type when different than class attribute type

ProtobinFile

Y

 

Path to the Google Protobin file that's packaged in a jar (ex: /quickstart/addressbook.protobin)

MessageMarshallers

Y

marshaller [,marshaller,..]

Contains Class names mapped its respective message marshaller, (class:marshaller,[class:marshaller,..]), that are to be registered for serialization

MessageDescriptor

Y

 

Message descriptor class name for the root object in cache

module

N

 

Specify the JBoss AS module that contains the cache classes that need to be loaded

CacheJndiName

N

 

JNDI name to find the CacheContainer

RemoteServerList

N

host:port[;host:port….]

Specify the host and ports that will be clustered together to access the caches

HotRodClientPropertiesFile

N

 

The HotRod properties file for configuring a connection to a remote cache

Examples
There are many ways to create the data source, using CLI, AdminShell, admin-console etc. The first example is an xml snippet of a resource-adapter that is used to connect to the JDG remote-query quick start:

Sample Resource Adapter
               <resource-adapter id="infinispanRemQS">
                    <module slot="main" id="org.jboss.teiid.resource-adapter.infinispan.dsl"/>
                    <connection-definitions>
                        <connection-definition class-name="org.teiid.resource.adapter.infinispan.dsl.InfinispanManagedConnectionFactory" jndi-name="java:/infinispanRemote" enabled="true" use-java-context="true" pool-name="infinispanDS">
                            <config-property name="CacheTypeMap">
                                addressbook:org.jboss.as.quickstarts.datagrid.hotrod.query.domain.Person;id
                            </config-property>
                            <config-property name="ProtobinFile">
                                 /quickstart/addressbook.protobin
                            </config-property>
                            <config-property name="MessageDescriptor">
                                quickstart.Person
                            </config-property>
                            <config-property name="Module">
                                com.client.quickstart.pojos
                            </config-property>
                            <config-property name="MessageMarshallers">                              org.jboss.as.quickstarts.datagrid.hotrod.query.domain.Person:org.jboss.as.quickstarts.datagrid.hotrod.query.marshallers.PersonMarshaller,org.jboss.as.quickstarts.datagrid.hotrod.query.domain.PhoneNumber:org.jboss.as.quickstarts.datagrid.hotrod.query.marshallers.PhoneNumberMarshaller,org.jboss.as.quickstarts.datagrid.hotrod.query.domain.PhoneType:org.jboss.as.quickstarts.datagrid.hotrod.query.marshallers.PhoneTypeMarshaller
                            </config-property>
                            <config-property name="RemoteServerList">
                                127.0.0.1:11322
                            </config-property>
                        </connection-definition>
                    </connection-definitions>
                </resource-adapter>
JBoss.org Content Archive (Read Only), exported from JBoss Community Documentation Editor at 2020-03-13 13:09:32 UTC, last content change 2015-10-14 16:24:19 UTC.