简体   繁体   中英

DistributedMap feature: how to use it

How to use the Liberty's distributedmap feature in a Java application?

Where I can find the required Maven dependencies (com.ibm.websphere.cache..)?

The Maven dependencies for WebSphere features like the DistributedMap are defined in the https://github.com/WASdev/ci.maven.tools repository and they are published on Maven central.

The following dependency loads all APIs:

<dependency>
    <groupId>net.wasdev.maven.tools.targets</groupId>
    <artifactId>liberty-apis</artifactId>
    <version>${liberty.dependency.version}</version>
    <scope>provided</scope>
    <type>pom</type>
</dependency>

The Maven coordinates for the distributedMap API would be:

<dependency>
  <groupId>com.ibm.websphere.appserver.api</groupId>
  <artifactId>com.ibm.websphere.appserver.api.distributedMap</artifactId>
  <version>2.0.68</version>
</dependency>

Each release of Liberty will have a different version, but that is from 22.0.0.9 the latest version as of this response. I found this by using search.maven.org and searching for distributedMap . This should work for other features APIs as well.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM