You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2021/11/19 11:11:48 UTC

[GitHub] [ignite-3] rpuch commented on a change in pull request #460: IGNITE-15897 [Ignite 3] ServiceLoader integration into configuration

rpuch commented on a change in pull request #460:
URL: https://github.com/apache/ignite-3/pull/460#discussion_r753102276



##########
File path: modules/table/src/main/resources/META-INF/services/org.apache.ignite.configuration.validation.ConfigurationModule
##########
@@ -0,0 +1,17 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+org.apache.ignite.internal.configuration.TableDistributedConfigurationModule

Review comment:
       It's an interesting idea. I found this plugin: https://github.com/francisdb/serviceloader-maven-plugin
   
   It looks like you need to write a snippet of configuration in the POM with a list of all service interfaces, and the plugin will scan maven module classes and list those that implement the interface in META-INF/services/<interface-fqn> file.
   
   This means that it can pick up some class that we didn't want to be picked (like `CompoundModule`), so we would have to configure it with either include or exclude.
   
   The bottomline is that this does not seem to be better than just crafting the service file by hand.
   
   A possibly better approach would be to use an annotation to mark 'the' classes to consider, but this plugin does not seem to have this capatibility, so we would have to implement it ourselves. This looks like an overkill now... And I think that I like the idea of explicitly listing all the needed implementations in one place (per maven module) :)




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org