JBoss Community Archive (Read Only)

Teiid Examples

Joss Data Grid (JDG) Remote Cache as a Data Source Example

This example demonstrates how to access a remote JBoss Data Grid cache using the JDG Hot Rod client. The "remote cache using query dsl" example will demonstrate using the "infinispan-cache-dsl" translator to query a remote cache using DSL over protobufs.


All the code discussed in this quickstart example is available in the jdg-remote-cache quick start.

See the README.md for directions to run the quick start.

This example shows how to:

  1. Define the source model to the object cache by specifying the translator type of "infinispan-cache-dsl".

  2. The source model metadata will be dynamically created based on the configured resource adapter. Notice there is no DDL being used, as in the local cache quick start. This quick start is defaulting to the dynamically created metadata. However, you can define your own metadata, as in the local cache quick start, and provide any necessary overrides.

  3. Setting up the Infinispan-dsl resource-adapter in order to communicate to the remote cache.

  4. Configure the JDG Cache as a data source, for which the translator is mapped to via the connection-jndi-name. It also demonstrates the ability to do reads and writes (Insert, Update and Delete) to the cache. Example queries are provided, but the actual content in the DML may not match the content you loaded in the cache.

JBoss.org Content Archive (Read Only), exported from JBoss Community Documentation Editor at 2020-03-13 13:14:06 UTC, last content change 2016-05-12 12:56:56 UTC.