[ 
https://issues.apache.org/jira/browse/ARTEMIS-4552?focusedWorklogId=899827&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-899827
 ]

ASF GitHub Bot logged work on ARTEMIS-4552:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 16/Jan/24 09:50
            Start Date: 16/Jan/24 09:50
    Worklog Time Spent: 10m 
      Work Description: gemmellr commented on code in PR #4729:
URL: https://github.com/apache/activemq-artemis/pull/4729#discussion_r1453163076


##########
artemis-server/src/main/java/org/apache/activemq/artemis/core/config/routing/CacheConfiguration.java:
##########
@@ -43,4 +52,12 @@ public CacheConfiguration setTimeout(int timeout) {
       this.timeout = timeout;
       return this;
    }
+
+   public CacheConfiguration() {
+
+   }
+
+   public CacheConfiguration(boolean enabled) {
+      this.enabled = enabled;
+   }

Review Comment:
   Can we put the constructors at the top given their importance in this case 
(will also minimise the diff in this case as one was there already)



##########
artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java:
##########
@@ -2871,6 +2871,9 @@ private void parseConnectionRouterConfiguration(final 
Element e, final Configura
    }
 
    private void parseCacheConfiguration(final Element e, final 
CacheConfiguration cacheConfiguration) throws ClassNotFoundException {
+      cacheConfiguration.setEnabled(getBoolean(e, "enabled",
+         cacheConfiguration.isEnabled()));

Review Comment:
   Feels like this would be better defaulting to simply the literal "true" per 
the xsd as you had it originally?



##########
artemis-server/src/main/java/org/apache/activemq/artemis/core/config/routing/PoolConfiguration.java:
##########
@@ -118,4 +129,12 @@ public PoolConfiguration setDiscoveryGroupName(String 
discoveryGroupName) {
       this.discoveryGroupName = discoveryGroupName;
       return this;
    }
+
+   public PoolConfiguration() {
+
+   }
+
+   public PoolConfiguration(boolean enabled) {
+      this.enabled = enabled;
+   }

Review Comment:
   Ditto



##########
artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java:
##########
@@ -2889,6 +2892,9 @@ private void parsePolicyConfiguration(final Element e, 
final NamedPropertyConfig
    }
 
    private void parsePoolConfiguration(final Element e, final Configuration 
config, final PoolConfiguration poolConfiguration) throws Exception {
+      poolConfiguration.setEnabled(getBoolean(e, "enabled",
+         poolConfiguration.isEnabled()));

Review Comment:
   ditto





Issue Time Tracking
-------------------

    Worklog Id:     (was: 899827)
    Time Spent: 1.5h  (was: 1h 20m)

> Configure all connection-router settings by using broker properties
> -------------------------------------------------------------------
>
>                 Key: ARTEMIS-4552
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-4552
>             Project: ActiveMQ Artemis
>          Issue Type: Improvement
>            Reporter: Domenico Francesco Bruscino
>            Assignee: Domenico Francesco Bruscino
>            Priority: Major
>          Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> Allow to configure all the connection-router settings by using the broker 
> properties. The broker properties for the cache configuration cause a null 
> pointer exception:
> {code}
> "connectionRouters.autoShard.cacheConfiguration.persisted=true"
> "connectionRouters.autoShard.cacheConfiguration.timeout=60000"
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to