이 콘텐츠는 선택한 언어로 제공되지 않습니다.
Chapter 24. The Infinispan CDI Module
Infinispan includes Context and Dependency Injection (CDI) in the
infinispan-cdi
module. The infinispan-cdi
module offers:
- Configuration and injection using the Cache API.
- A bridge between the cache listeners and the CDI event system.
- Partial support for the JCACHE caching annotations.
24.1. Using Infinispan CDI 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
24.1.1. Infinispan CDI Prerequisites 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
The following is a list of prerequisites to use the Infinispan CDI module with Red Hat JBoss Data Grid:
- Ensure that the most recent version of the infinispan-cdi module is used.
- Ensure that the correct dependency information is set.
24.1.2. Set the CDI Maven Dependency 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
The CDI module is included in the Infinispan jar for each deployment type, and no additional dependencies are required.
Library Mode
In Library mode the infinispan-embedded
artifact contains the CDI module, and should be added as a dependency as seen in the below example:
<dependency> <groupId>org.infinispan</groupId> <artifactId>infinispan-embedded</artifactId> <version>${infinispan.version}</version> </dependency>
<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-embedded</artifactId>
<version>${infinispan.version}</version>
</dependency>
Remote Client-Server Mode
In Remote Client-Server mode the infinispan-remote
artifact contains the CDI module, and should be added as a dependency as seen in the below example:
<dependency> <groupId>org.infinispan</groupId> <artifactId>infinispan-remote</artifactId> <version>${infinispan.version}</version> </dependency>
<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-remote</artifactId>
<version>${infinispan.version}</version>
</dependency>