Infinispan-DSL Data Sources

Page added by Van Halbert


Infinispan-DSL Data Sources

Infinispan-DSL data sources use a Teiid specific JCA connector that is deployed into AS 7.2 (EAP 6.1 Alpha) 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 query 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]
[,cacheName:className[;pkFieldName]..]
Map the root Java Object class name to the cache, and identify which attribute is the primary key to the cache.
ProtobinFile Y   Path to the Google Protobin file that's packaged in a jar
MessageMarshallers Y marshaller [,marshaller,..] Class names for the message marshallers, (marshaller,[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">
                                /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>
 
Stop watching space | Change email notification preferences
View Online | Add Comment