-
1. Re: Infinispan subsystem does not work as expected
pferraro Sep 21, 2016 2:51 PM (in response to arielcarrera)CDI beans result in the @Resource annotation being processed by Weld rather than the EE subsystem. To workaround this, create a <resource-ref/> or <resource-env-ref/> in your deployment descriptor and reference the @Resource by its mapped name. This way, the EE subsytem will process the deployment descriptor and weld will have no issues resolving the @Resource from the application/module namespace.
e.g.
<resource-ref> <res-ref-name>testCache</res-ref-name> <lookup-name>java:jboss/infinispan/cache/test/default</lookup-name> <resource-ref>
@Resource(name="testCache") private Cache<String,String> testCache;
-
2. Re: Infinispan subsystem does not work as expected
arielcarrera Sep 21, 2016 3:21 PM (in response to pferraro)Thanks Paul but I don't have a servlet deployment descriptor (web.xml)... my application is packaged as a default switchyard deployment (jar file).
Do you know if another workaround exists? Currently I use a programmatically definition to solve it but I prefer to use an infinispan subsystem if can be possible....
-
3. Re: Infinispan subsystem does not work as expected
pferraro Sep 21, 2016 7:10 PM (in response to arielcarrera)I didn't say anything about needing a servlet deployment descriptor. Any EE deployment descriptor will do. I suggest creating an ejb-jar.xml or application-client.xml.
-
4. Re: Infinispan subsystem does not work as expected
arielcarrera Sep 22, 2016 5:47 AM (in response to pferraro)OK Paul. I will take into consideration the suggested change.
Thanks.