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

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

                Author: ASF GitHub Bot
            Created on: 01/Apr/26 19:29
            Start Date: 01/Apr/26 19:29
    Worklog Time Spent: 10m 
      Work Description: tabish121 commented on code in PR #6324:
URL: https://github.com/apache/artemis/pull/6324#discussion_r3024191749


##########
artemis-cli/src/main/resources/META-INF/services/org.apache.activemq.artemis.cli.factory.BrokerFactoryHandler:
##########
@@ -0,0 +1 @@
+org.apache.activemq.artemis.cli.factory.xml.XmlBrokerFactoryHandler

Review Comment:
   It seems like these service definitions can still have Apache license 
headers added as the ServiceLoader javadocs indicates it will ignore anything 
following the '#' character





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

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

> Replace FactoryFinder with Java ServiceLoader
> ---------------------------------------------
>
>                 Key: ARTEMIS-5974
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-5974
>             Project: Artemis
>          Issue Type: Task
>            Reporter: Justin Bertram
>            Assignee: Justin Bertram
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> The {{artemis-cli}} module uses a custom 
> {{org.apache.activemq.artemis.utils.FactoryFinder}} implementation which can 
> be replaced by {{java.util.ServiceLoader}}.
> Using {{ServiceLoader}} provides (among other things):
>  - Standard, well-understood service discovery mechanism
>  - Reduced maintenance burden
>  - Type safety (i.e., eliminates casting from {{Object}})
>  - Simpler service provider file format
>  - Consistency with the rest of the code-base
> Old format: Properties files at 
> {{META-INF/services/org/apache/activemq/artemis/broker/<scheme>}} containing:
> {noformat}
> class=<fully.qualified.ClassName>{noformat}
> New format: Plain text files at 
> {{META-INF/services/<fully.qualified.InterfaceName>}} containing:
> {noformat}
> <fully.qualified.ImplementationName>
> <fully.qualified.ImplementationName>{noformat}
> There will be no API changes or behavioral differences. The broker will 
> continue to discover and load factory implementations exactly as before, just 
> using the standard Java mechanism.
> Existing tests will verify functionality and ensure there are no regressions.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to