yzhao244 commented on a change in pull request #434:
URL:
https://github.com/apache/incubator-eventmesh/pull/434#discussion_r670974544
##########
File path:
eventmesh-store-h2/src/main/java/org/apache/eventmesh/store/h2/schema/util/DBDataSource.java
##########
@@ -0,0 +1,42 @@
+package org.apache.eventmesh.store.h2.schema.util;
+
+import org.apache.eventmesh.store.h2.schema.configuration.DBConfiguration;
+import org.apache.commons.dbcp2.BasicDataSource;
+
+import java.sql.Connection;
+import java.sql.SQLException;
+
+public class DBDataSource {
+ private static BasicDataSource ds = null;
+
+ private DBDataSource() {
+
+ }
+
+ public static synchronized DBDataSource createDataSource(DBConfiguration
dbConfig) {
Review comment:
Yes, DBDataSource is singleton. Basically, it performs init, start and
shutdown as part of EventMeshServer init, start and shutdown process.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]