Claus Ibsen created CAMEL-28000:
-----------------------------------

             Summary: camel-infinispan - cluster view lifespan bugs, remote 
repository ignores its connection options
                 Key: CAMEL-28000
                 URL: https://issues.apache.org/jira/browse/CAMEL-28000
             Project: Camel
          Issue Type: Bug
          Components: camel-infinispan
            Reporter: Claus Ibsen
             Fix For: 4.25.0


h4. 1. InfinispanEmbeddedClusterView / InfinispanRemoteClusterView: lifespan=1 
fails at start

The refresh period is getLifespan()/2 in lifespanTimeUnit; with lifespan=1 it 
is 0 and scheduleAtFixedRate throws IllegalArgumentException. Proposed change: 
compute the period in millis, at least 1.

h4. 2. InfinispanRemoteClusterView: a sub-second lifespan never expires

replaceWithVersion(..., (int) toSeconds(lifespan)) turns 500 ms into 0, which 
means no expiry. Proposed change: use the overload with the unit, or at least 1 
second.

h4. 3. InfinispanRemoteClusterService fails with camel-langchain4j-embeddings 
on the classpath

The cluster configuration keeps embeddingStoreEnabled=true with dimension 0, so 
InfinispanRemoteManager fails with "embeddingStoreDimension must be 
configured". Proposed change: InfinispanRemoteClusterConfiguration sets 
embeddingStoreEnabled=false.

h4. 4. InfinispanRemoteAggregationRepository ignores hosts, credentials and 
configurationUri

doStart always sets a cacheContainerConfiguration (to add 
DefaultExchangeHolderContextInitializer), so InfinispanRemoteManager ignores 
hosts, secure/username/password, configurationUri and configurationProperties, 
and connects to 127.0.0.1:11222 unless cacheContainer is set. Proposed change: 
build the client configuration from those options first.

h4. 5. InfinispanRemoteIdempotentRepository / KeyValueRepository without hosts

They fail at start with a NullPointerException 
(ConfigurationBuilder.addServers(null)). Proposed change: a clear error.

Found while checking the option and console descriptions of CAMEL-27980.

----
_Filed by Claude Code on behalf of davsclaus_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to