The "JBoss Data Grid Running in Library Mode as a Data Source" quick start example demonstrates how to access JBoss Data Grid as a data source. The JDG cache will be running in library mode using the infinispan-cache translator.
All the code discussed in this quickstart example is available in the jdg-local-cache quick start.
See the README.md for directions to run the quick start.
Define the source model to the object cache using DDL metadata
Configure the translator type of "infinispan-cache" to access the cache.
Configure a translator override to enable SupportsDSLSearching on the cache. The pojos classes do not need annotations to enable searching.
An example web application is used to define the cache container, bind to jndi and preload its contents.
Configure the resource adapter for connecting to the JDG Cache as a data source, for which the translator is mapped to via the connection-jndi-name.
Demonstrate the ability to do read and writes (Select, Insert, Update and Delete) to the cache. Example queries are provided.