[jira] [Work logged] (ARTEMIS-4818) Improve support for multiple broker plugins from broker properties

2024-06-18 Thread ASF GitHub Bot (Jira)


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

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

Author: ASF GitHub Bot
Created on: 18/Jun/24 12:05
Start Date: 18/Jun/24 12:05
Worklog Time Spent: 10m 
  Work Description: gemmellr merged PR #4983:
URL: https://github.com/apache/activemq-artemis/pull/4983




Issue Time Tracking
---

Worklog Id: (was: 923882)
Time Spent: 50m  (was: 40m)

> Improve support for multiple broker plugins from broker properties
> --
>
> Key: ARTEMIS-4818
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4818
> Project: ActiveMQ Artemis
>  Issue Type: Improvement
>Reporter: Domenico Francesco Bruscino
>Assignee: Domenico Francesco Bruscino
>Priority: Major
>  Time Spent: 50m
>  Remaining Estimate: 0h
>
> The broker support loading multiple broker plugins from the broker properties 
> only if they expose a getter/setter for the property name. Could you support 
> loading multiple broker plugins without a getter/setter for the property name?



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

-
To unsubscribe, e-mail: issues-unsubscr...@activemq.apache.org
For additional commands, e-mail: issues-h...@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact




[jira] [Work logged] (ARTEMIS-4818) Improve support for multiple broker plugins from broker properties

2024-06-18 Thread ASF GitHub Bot (Jira)


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

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

Author: ASF GitHub Bot
Created on: 18/Jun/24 11:26
Start Date: 18/Jun/24 11:26
Worklog Time Spent: 10m 
  Work Description: brusdev opened a new pull request, #4983:
URL: https://github.com/apache/activemq-artemis/pull/4983

   (no comment)




Issue Time Tracking
---

Worklog Id: (was: 923879)
Time Spent: 40m  (was: 0.5h)

> Improve support for multiple broker plugins from broker properties
> --
>
> Key: ARTEMIS-4818
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4818
> Project: ActiveMQ Artemis
>  Issue Type: Improvement
>Reporter: Domenico Francesco Bruscino
>Assignee: Domenico Francesco Bruscino
>Priority: Major
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> The broker support loading multiple broker plugins from the broker properties 
> only if they expose a getter/setter for the property name. Could you support 
> loading multiple broker plugins without a getter/setter for the property name?



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

-
To unsubscribe, e-mail: issues-unsubscr...@activemq.apache.org
For additional commands, e-mail: issues-h...@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact




[jira] [Work logged] (ARTEMIS-4818) Improve support for multiple broker plugins from broker properties

2024-06-18 Thread ASF GitHub Bot (Jira)


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

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

Author: ASF GitHub Bot
Created on: 18/Jun/24 10:27
Start Date: 18/Jun/24 10:27
Worklog Time Spent: 10m 
  Work Description: gemmellr commented on code in PR #4979:
URL: https://github.com/apache/activemq-artemis/pull/4979#discussion_r1644220864


##
artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImpl.java:
##
@@ -3489,10 +3498,19 @@ private Object trackCollectionOrMap(String name, Object 
resolved, Object bean) {
 
   private Object findByNameProperty(String key, Collection collection) 
throws InvocationTargetException, IllegalAccessException, NoSuchMethodException 
{
  // locate on name property, may be a SimpleString
- for (Object candidate : collection) {
-Object candidateName = getProperty(candidate, "name");
-if (candidateName != null && key.equals(candidateName.toString())) 
{
-   return candidate;
+ if (isClassProperty(key)) {

Review Comment:
   The comment on the line above this should either be adjusted, or move down 
toward the code it applied to originally.



##
artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImpl.java:
##
@@ -958,6 +958,15 @@ public  T convert(Class type, Object value) {
   updateApplyStatus(propsId, errors);
}
 
+   private static boolean isClassProperty(String property) {
+  return property.endsWith(PROPERTY_CLASS_SUFFIX);
+   }
+
+   private static String extractPropertyClassName(String property) {
+  int propertyClassSuffixIndex = property.indexOf(PROPERTY_CLASS_SUFFIX);
+  return property.substring(0, propertyClassSuffixIndex);
+   }

Review Comment:
   These two are a bit inconsistent, in that the first one only checks for 
_endsWith_, but the second extracts only up to the _first_ instance found, 
which could be different. Would be better if they both operated on the end 
basis for consistency (also saves looking for the location index of a value you 
can already calculate).





Issue Time Tracking
---

Worklog Id: (was: 923860)
Time Spent: 0.5h  (was: 20m)

> Improve support for multiple broker plugins from broker properties
> --
>
> Key: ARTEMIS-4818
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4818
> Project: ActiveMQ Artemis
>  Issue Type: Improvement
>Reporter: Domenico Francesco Bruscino
>Assignee: Domenico Francesco Bruscino
>Priority: Major
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> The broker support loading multiple broker plugins from the broker properties 
> only if they expose a getter/setter for the property name. Could you support 
> loading multiple broker plugins without a getter/setter for the property name?



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

-
To unsubscribe, e-mail: issues-unsubscr...@activemq.apache.org
For additional commands, e-mail: issues-h...@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact




[jira] [Work logged] (ARTEMIS-4818) Improve support for multiple broker plugins from broker properties

2024-06-18 Thread ASF GitHub Bot (Jira)


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

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

Author: ASF GitHub Bot
Created on: 18/Jun/24 10:17
Start Date: 18/Jun/24 10:17
Worklog Time Spent: 10m 
  Work Description: gtully merged PR #4979:
URL: https://github.com/apache/activemq-artemis/pull/4979




Issue Time Tracking
---

Worklog Id: (was: 923857)
Time Spent: 20m  (was: 10m)

> Improve support for multiple broker plugins from broker properties
> --
>
> Key: ARTEMIS-4818
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4818
> Project: ActiveMQ Artemis
>  Issue Type: Improvement
>Reporter: Domenico Francesco Bruscino
>Assignee: Domenico Francesco Bruscino
>Priority: Major
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> The broker support loading multiple broker plugins from the broker properties 
> only if they expose a getter/setter for the property name. Could you support 
> loading multiple broker plugins without a getter/setter for the property name?



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

-
To unsubscribe, e-mail: issues-unsubscr...@activemq.apache.org
For additional commands, e-mail: issues-h...@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact




[jira] [Work logged] (ARTEMIS-4818) Improve support for multiple broker plugins from broker properties

2024-06-14 Thread ASF GitHub Bot (Jira)


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

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

Author: ASF GitHub Bot
Created on: 14/Jun/24 08:32
Start Date: 14/Jun/24 08:32
Worklog Time Spent: 10m 
  Work Description: brusdev opened a new pull request, #4979:
URL: https://github.com/apache/activemq-artemis/pull/4979

   …properties




Issue Time Tracking
---

Worklog Id: (was: 923462)
Remaining Estimate: 0h
Time Spent: 10m

> Improve support for multiple broker plugins from broker properties
> --
>
> Key: ARTEMIS-4818
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4818
> Project: ActiveMQ Artemis
>  Issue Type: Improvement
>Reporter: Domenico Francesco Bruscino
>Assignee: Domenico Francesco Bruscino
>Priority: Major
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> The broker support loading multiple broker plugins from the broker properties 
> only if they have a different class and expose a getter/setter for the 
> property name. Could you improve the broker property syntax to define the 
> class instance name in the key optionally? In this way, users could add 
> multiple instances of the same broker plugin even if it has no getter/setter 
> for the property name, i.e.
> {code}
> brokerPlugins."org.apache.activemq.artemis.core.server.plugin.impl.LoggingActiveMQServerPlugin#my-instance-0.class".init=LOG_ALL_EVENTS=false
> brokerPlugins."org.apache.activemq.artemis.core.server.plugin.impl.LoggingActiveMQServerPlugin#my-instance-1.class".init=LOG_ALL_EVENTS=true
> {code}



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

-
To unsubscribe, e-mail: issues-unsubscr...@activemq.apache.org
For additional commands, e-mail: issues-h...@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact