ruanwenjun commented on code in PR #15139:
URL: 
https://github.com/apache/dolphinscheduler/pull/15139#discussion_r1386803607


##########
dolphinscheduler-standalone-server/src/main/java/org/apache/dolphinscheduler/registry/JdbcStandaloneRegistry.java:
##########
@@ -0,0 +1,34 @@
+/*
+ * 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.
+ */
+
+package org.apache.dolphinscheduler.registry;
+
+import org.springframework.stereotype.Component;
+
+@Component
+public class JdbcStandaloneRegistry implements StandaloneRegistry {
+
+    @Override
+    public void init() {
+        // The JDBC plugin will take effect via @ConditionalOnProperty.
+    }
+
+    @Override
+    public boolean supports(String registryType) {
+        return "jdbc".equalsIgnoreCase(registryType);
+    }
+}

Review Comment:
   Can we remove this? I hope we can only add a StandaloneZookeeperRegistry, in 
this class, we will start a `TestingServer`, and user can still use zookeeper 
registry to connect their own zk cluster or use JDBC to connect their own db.



##########
dolphinscheduler-registry/dolphinscheduler-registry-plugins/dolphinscheduler-registry-jdbc/src/main/java/org/apache/dolphinscheduler/plugin/registry/jdbc/JdbcRegistryConfiguration.java:
##########
@@ -34,7 +34,7 @@
 @ConditionalOnProperty(prefix = "registry", name = "type", havingValue = 
"jdbc")
 public class JdbcRegistryConfiguration {
 
-    @Bean
+    @Bean("sqlSessionFactory")

Review Comment:
   It's not a good idea add name 'sqlSessionFactory' for this bean, since this 
will cause the JdbcRegistry use the same sql session factory with the business.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to