-
1. Re: Where is Infinispan-query in EAP 6.2??
wdfink Jul 21, 2014 11:27 AM (in response to drathnow)1 of 1 people found this helpfulThe Infinispan modules provided by EAP distribution are only for internal use (session replication, cluster and other internal caches), therefore there is no infinispan-query available.
You need to pack the relevant Infinispan/JDG libraries with your application.
A simple way to achive it is to use JDG 6.3 which provide modules for EAP, you only need to add a dependency but not pack the bits into the application.
Also notice that this require an additional JDG supbsription if you use EAP/JDG in production.
-
2. Re: Where is Infinispan-query in EAP 6.2??
drathnow Jul 21, 2014 3:58 PM (in response to wdfink)Thanks for the reply Wolf.
Assuming I bundle my own copies of the Infinispan jars, does this mean I have to stick with configuring my cache in code rather than XML (via domain.xml)?
-
3. Re: Where is Infinispan-query in EAP 6.2??
wdfink Jul 22, 2014 5:33 AM (in response to drathnow)If you try to use application caches together with the supported EAP version?
In short : YES
You need to use the library mode, which mean you pack JDG/Infinispan with your app and configure it here via xml descriptor inside the application or programatic.
The standalone/domain.xml use the EAP bundled infinispan and this in only for internal use.
Technically it is possible but it is not supported to use application drive caches or change the Infinispan modules in EAP
-
4. Re: Where is Infinispan-query in EAP 6.2??
drathnow Jul 24, 2014 3:36 PM (in response to wdfink)Thanks again Wolf,
I have used library mode and bundled the Infinispan jarfiles in my app (ear file) but when I try to deploy I get the exception:
Caused by: java.lang.ClassCastException: Cannot cast org.infinispan.query.impl.LifecycleManager to org.infinispan.lifecycle.ModuleLifecycle
at java.lang.Class.cast(Class.java:3005) [rt.jar:1.7.0_06]
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:362) [rt.jar:1.7.0_06]
(This is a much condensed version of the stack trace. I can provide more if you like)
The problem seems to be a conflict between the two versions of the infinispan-core jarfiles. I traced through the code and found that it's trying to cast the LifecycleManager class to ModuleLifecycle interface, which should work because LifecycleManager implements ModuleLifecycle. However, the problem is that LifecycleManager comes from my own infinispan-core-5.2.7.Final.jar (in my ear/lib directory) and the ModuleLifecycle interface is coming from infinispan-core-5.2.7.Final-redhat-2.jar in the JBoss distribution. If I remove the infinispan-core-5.2.7.Final.jar from my ear, the app deploys fine.
Is there a way to fix this? That is, how can I tell jboss to use the infinispan-core-5.2.7.Final.jar from my ear or do I have to build my earfile and make sure I don't pull in infinispan-core-5.2.7.Final.jar? (I'm asking because I don't know how to go about doing this with maven but will figure it out if there's no other way)
-
5. Re: Where is Infinispan-query in EAP 6.2??
wdfink Jul 25, 2014 4:54 AM (in response to drathnow)You might use the JDG6.3 EAP-modules and the jboss-deployment-structure.xml in your application. See jboss-jdg-quickstarts/eap-cluster-app