This content has been marked as final.
Show 2 replies
-
1. Re: WF11 -> WF13, infinispan upgrade problem
pmm Jun 12, 2018 8:59 AM (in response to hannez82)We had a similar issue, here is how we solved it:
- Use the default JNDI names of Inifinispan
- Reference the JNDI names in ebj-jar.xml / web.xml, see Access WildFly Infinispan Cache Container from Web Application
-
2. Re: WF11 -> WF13, infinispan upgrade problem
pferraro Jun 12, 2018 12:58 PM (in response to hannez82)To optimize the portability of your code, I recommend that you access your Infinispan cache via a resource reference, rather referencing a vendor specific namespace. To do this, add the following to your deployment descriptor:
<resource-env-ref> <resource-env-ref-name>cache/latest_xx_status</resource-env-ref-name> <resource-env-ref-type>org.infinispan.Cache</resource-env-ref-type> <lookup-name>java:jboss/infinispan/cache/latest_xx_status/default</lookup-name> </resource-env-ref>
Then reference the cache using:
@Resource(name="cache/latest_xx_status") private Cache<?, ?> cache;