See https://issues.jboss.org/browse/ISPN-5092
Unfortunately bad news on this one - in short it can't be done. I consulted this with Martin Kouba and Jozef Hartinger. They pointed out that CDI Spec states [1]: "If a bean class is deployed in two different bean archives, non-portable behavior results. Portable applications must deploy each bean class in no more than one bean archive." I believe we have at least 2 choices what to do next: 1. Document it as unsupported configuration (my recommendation). 2. Pull the CDI extension out of embedded/remote Uber Jars. This will allow our client to use them both of them and add CDI extension manually. [1] http://docs.jboss.org/cdi/spec/1.0/html_single/#beanarchive
Sebastian Łaskawiec <slaskawi> updated the status of jira ISPN-5092 to Closed
Looks like worth commenting here. IIRC we need both uber-jars at class path in remote cache store scenario.
Unfortunately this issue can not be fully fixed without breaking backward compatibility. An ideal solution would require moving classes from org.infinispan.cdi package into org.infinispan.cdi.common/remote/embedded. Having this in mind we can not fix it entirely in JDG 6.x series (minor releases). However we can do it in JDG7.
Unfortunately there is an issue with JCache Annotation extension (mentioned in https://bugzilla.redhat.com/show_bug.cgi?id=1278424) and we can not verify this issue in this milestone.
Cannot be verified without https://bugzilla.redhat.com/show_bug.cgi?id=1278424 being fixed.
Looks good in ER2.