The 7.0.0.Alpha1 introduces a "features" file which not only lists all dependencies required for correct functionality of the HotRod client in OSGi, but also makes it very easy to install the whole feature into Karaf (version 2.3.3 or 3.0) in just a few steps.
HotRod client feature file for OSGi
The feature file has been deployed into JBoss Nexus repository so it's publicly available. It looks like this:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<features> | |
<feature name="hotrod-client" version="7.0.0.Alpha1"> | |
<bundle>mvn:org.jboss.logging/jboss-logging/3.1.2.GA</bundle> | |
<bundle>mvn:org.infinispan/infinispan-commons/7.0.0.Alpha1</bundle> | |
<bundle>mvn:commons-pool/commons-pool/1.6</bundle> | |
<bundle>mvn:org.jboss.marshalling/jboss-marshalling-osgi/1.4.2.Final</bundle> | |
<bundle>mvn:org.infinispan/infinispan-client-hotrod/7.0.0.Alpha1</bundle> | |
</feature> | |
<feature name="hotrod-client-with-query" version="7.0.0.Alpha1"> | |
<feature version="7.0.0.Alpha1">hotrod-client</feature> | |
<bundle>mvn:org.infinispan/infinispan-query-dsl/7.0.0.Alpha1</bundle> | |
<bundle>mvn:com.google.protobuf/protobuf-java/2.5.0</bundle> | |
<bundle>mvn:org.infinispan/infinispan-remote-query-client/7.0.0.Alpha1</bundle> | |
<bundle>mvn:org.infinispan.protostream/protostream/1.0.0.Final</bundle> | |
</feature> | |
</features> |
Installing the HotRod client feature in Karaf
The HotRod feature (either a simple HotRod client or HotRod client with remote query capabilities) can be installed in Karaf in the following steps:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
karaf@root> features:addUrl mvn:org.infinispan/infinispan-client-hotrod/7.0.0.Alpha1/xml/features | |
karaf@root> features:install hotrod-client | |
karaf@root> list | |
START LEVEL 100 , List Threshold: 50 | |
ID State Blueprint Level Name | |
[ 316] [Active ] [ ] [ 80] JBoss Logging 3 (3.1.2.GA) | |
[ 317] [Active ] [ ] [ 80] Infinispan Commons (7.0.0.Alpha1) | |
[ 318] [Active ] [ ] [ 80] Commons Pool (1.6.0) | |
[ 319] [Active ] [ ] [ 80] JBoss Marshalling OSGi Bundle (1.4.2.Final) | |
[ 320] [Active ] [ ] [ 80] Infinispan Hot Rod Client (7.0.0.Alpha1) | |
karaf@root> features:install hotrod-client-with-query | |
Refreshing bundles org.infinispan.client-hotrod (320) | |
karaf@root> list | |
START LEVEL 100 , List Threshold: 50 | |
ID State Blueprint Level Name | |
[ 316] [Active ] [ ] [ 80] JBoss Logging 3 (3.1.2.GA) | |
[ 317] [Active ] [ ] [ 80] Infinispan Commons (7.0.0.Alpha1) | |
[ 318] [Active ] [ ] [ 80] Commons Pool (1.6.0) | |
[ 319] [Active ] [ ] [ 80] JBoss Marshalling OSGi Bundle (1.4.2.Final) | |
[ 320] [Active ] [ ] [ 80] Infinispan Hot Rod Client (7.0.0.Alpha1) | |
[ 321] [Active ] [ ] [ 80] Infinispan Query DSL API (7.0.0.Alpha1) | |
[ 322] [Active ] [ ] [ 80] Protocol Buffer Java API (2.5.0) | |
[ 323] [Active ] [ ] [ 80] Infinispan Remote Query Client (7.0.0.Alpha1) | |
[ 324] [Active ] [ ] [ 80] ProtoStream - core (1.0.0.Final) |
There's still one limitation with respect to remote querying, though. The remote query feauture requires a JMX-based connection to Infinispan server in order to be able to register a .protobin file, which holds the description of data types being transferred between the client and server. Since a remoting-jmx protocol is required and the existing remoting-jmx client does not work correctly in OSGi (see https://issues.jboss.org/browse/ISPN-4011), it is required to register the .protobin file in another way - not from inside the OSGi container. This will be fixed in one of the next releases.
Stay connected for news about running the whole Infinispan datagrid in OSGi, not only the HotRod client. This is work in progress.
Cheers,
Martin
No comments:
Post a Comment