JBoss Data Grid on JBoss Fuse / Karaf library mode vs server mode and Camel-datagrid component
Environment
JBoss Data Grid 6.3, 6.4
JBoss Fuse 6.1
Issue
Can JBoss Data Grid (JDG) library mode be run on JBoss Fuse?
How do I access JDG via Camel?
Resolution
There are three perspectives to this questions: 1) subscription, 2) container, 3) how to access to JDG.
1. Subscription:
JBoss Data Grid has two downloads A). jboss-datagrid-6.3.1-library.zip and B). jboss-datagrid-6.3.1-server.zip
The first one is library mode, so just comes with Infinispan and JGroups and you will need to bring your own container (EAP, Karaf, tomcat, etc). The second one is Server mode, it packages Infinispan with EAP (server), and it is a pure remote cache, and your application client will access this cache remotely via hotrod, memcached api, REST api. library mode subscription DOES NOT have the entitlement to run server mode. However, library mode is included in server mode. That means if you have JDG Server entitlements, you can either use server mode or library mode.
2. Container:
JDG server mode comes with a EAP as the container; however, this is not expected to be used as a JEE server outside the scope of datagrid.
JDG library mode is an add-on, and you will need to bring your own container. Here is the list of certified containers.
JBoss Fuse 6.1 has Apache Karaf as the container, and it is a certified container for JDG 6.3 library mode. Here is the installation guide:
3. Accessing JDG:
In JDG 6.3, when running on JBoss Fuse / Karaf, user will need to access JDG library mode cache from own Java beans.
We targeted JDG 6.4 to productise and support camel-jbossdatagrid, it is a Camel component to make it easy to access the JDG cache in Camel.
The customer will need a JDG subscription for support for camel-jbossdatagrid + distributed caching provided by JDG, i.e. Fuse + JDG for this configuration.
Root Cause
It is a bit complex for JDG and various combinations of configurations:
1. JDG has two modes: library and server.
-
In 6.3, JDG has certified Karaf 2.3 and 3.0 and Karaf 2.3 is included in JBoss Fuse.
-
Bean vs Camel component: In the community, we have camel-infinispan component for camel 2.13. JBoss Fuse is based on camel 2.12 and does not have this component until JBoss Fuse 6.2 (camel 2.14). Now, the camel-infinispan is compiled with infinispan library and in order to properly package the JDG library, they should be using camel-datagrid instead. Camel-datagrid component (based on camel 2.12) will be available in JDG 6.4 and will be updated to run and support on JBoss Fuse 6.1
ref: http://camel.apache.org/infinispan.html
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
