Authentication 如何在Payara 5.193中配置数据网格ttl

Authentication 如何在Payara 5.193中配置数据网格ttl,authentication,hazelcast,shiro,ttl,payara,Authentication,Hazelcast,Shiro,Ttl,Payara,之前,对于Payara 4,我们使用Hazelcast集群/数据网格。我们在一个名为hazelcast-config.xml的文件中为网格映射条目配置了集群发现和ttl: <?xml version="1.0" encoding="UTF-8"?><hazelcast xmlns="http://www.hazelcast.com/schema/config" xmlns:xsi="http://www.w3.org/2 001/XMLSchema-instance" xsi:

之前,对于Payara 4,我们使用Hazelcast集群/数据网格。我们在一个名为hazelcast-config.xml的文件中为网格映射条目配置了集群发现和ttl:

<?xml version="1.0" encoding="UTF-8"?><hazelcast xmlns="http://www.hazelcast.com/schema/config" xmlns:xsi="http://www.w3.org/2
001/XMLSchema-instance" xsi:schemaLocation="http://www.hazelcast.com/schema/config hazelcast-config-3.5.xsd">
  <properties/>
  <group>
    <name>prod</name>
    <password>pass</password>
  </group>
  <management-center enabled="false">http://localhost:8180/mancenter</management-center>
  <network>
           <join>
      <multicast enabled="false">
        <multicast-group>my-group</multicast-group>
        <multicast-port>my-port</multicast-port>
      </multicast>              

<tcp-ip enabled="false">
        <interface>127.0.0.1</interface>
        <member-list>
          <member>127.0.0.1</member>
        </member-list>
      </tcp-ip>
    </join>
    <interfaces enabled="true">
      <interface><my-ip-address></interface>
    </interfaces>
  </network>
  <map name="*.authorizationCache">
    <async-backup-count>1</async-backup-count>
    <backup-count>0</backup-count>
    <time-to-live-seconds>7210</time-to-live-seconds>
  </map>
<map name="*.authenticationCache">
           <async-backup-count>1</async-backup-count>
        <backup-count>0</backup-count>
        <time-to-live-seconds>7200</time-to-live-seconds>
    </map>
  <map name="/mymap">
    <async-backup-count>1</async-backup-count>
    <backup-count>0</backup-count>
    <time-to-live-seconds>7210</time-to-live-seconds>
  </map>
  <map name="default">
    <async-backup-count>1</async-backup-count>
    <backup-count>0</backup-count>
  </map>
</hazelcast>

戳
通过
http://localhost:8180/mancenter
我的小组
我的港口
127.0.0.1
127.0.0.1
)没有使用hazelcast-config.xml,“只起作用”。问题是,没有xml文件ttl就不能工作。如果我提供hazelcast-config.xml,它会提供我的ttl配置,但我会丢失域发现

有没有办法在Payara 5.193上同时进行域发现和数据网格ttl配置?看起来我应该能够在shiro.ini中设置ttl,但我没有看到任何文档表明这一点


谢谢您

在您的Hazelcast配置中,您没有discovery设置。您可以使用
禁用基于多播的发现。您还可以使用
禁用静态IP配置。然后,没有配置发现,Hazelcast将不会形成集群


您需要设置静态IP配置或使用任何发现机制。请在此处阅读更多内容:。

在生产中,我们确实启用了发现方法。但是,我希望使用域或AWS发现,而在hazelcast 3.5.3中使用hazelcast-config.xml时,这似乎不可用。我认为升级到3.12会有所帮助。谢谢。是的,请升级,3.5.3版本非常旧。我想这更像是一个shiro问题,而不是hazelcast问题。问题仍然存在:如果不在hazelcast-config.xml中,如何设置shiro的realm.authenticationCache TTL?