On Wed, 5 Dec 2018 at 11:16, Tristan Tarrant <ttarr...@redhat.com> wrote:
>
> On 12/5/18 9:44 AM, Gunnar Morling wrote:
> > Hey,
> >
> > I was trying to configure and inject an Infinispan cache through CDI,
> > running on WildFly 14, using the Infinispan modules provided by the
> > server.
> >
> > While I'm not sure whether that's something supported or recommended,
> > I found this preferable over adding Infinispan another time as part of
> > the deployment. I couldn't find any recent info on doing this (would
> > love any pointers, though), so here's my findings, in case it's
> > interesting for others:
>
> You should not be using the Infinispan subsystem that comes with WildFly
> as its configuration capabilities are a bit limited, but the modules we
> supply:
>
> http://infinispan.org/docs/stable/user_guide/user_guide.html#infinispan_modules_for_wildfly_eap

Hi Gunnar,
to automate such things during integration testing, have a look at the
provisioning plugins for Maven.

 - 
https://github.com/infinispan/infinispan/tree/master/integrationtests/wildfly-modules
 - 
https://github.com/infinispan/infinispan/blob/master/integrationtests/wildfly-modules/pom.xml#L222-L249
 - 
https://github.com/infinispan/infinispan/blob/master/integrationtests/wildfly-modules/server-provisioning.xml

One the custom WildFly is built, you can use it "as usual" via Arquillian.

Don't use the Infinispan jars included within Wildfly as those are
"implementation detail": don't have all the bits necessary (e.g. CDI
integration) and are not tested nor supportable for such use case.

Hibernate OGM does something similar:
 - 
https://github.com/hibernate/hibernate-ogm/blob/master/integrationtest/server-provisioning.xml
It's not listing the Infinispan modules explicitly as some specific
OGM modules depend on them transitively, but you get the idea ;)

-- Sanne

>
> > Btw. I also couldn't find an example for configuring a cache through
> > jboss-cli.sh, perhaps that's something to consider, too?
>
> Yes, that should be added.
>
> Tristan
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev
_______________________________________________
infinispan-dev mailing list
infinispan-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/infinispan-dev

Reply via email to