瀏覽代碼

Completely untested, needs some more work as follows:

A.  Handle reconnecting on full disconnects.
B.  refactor code to use same connection object in same task(Some tasks go through many methods that each get their own connection object)
C.  Test that it actually works :P
t00thpick1 11 年之前
父節點
當前提交
a3066803d0
共有 2 個文件被更改,包括 311 次插入396 次删除
  1. 10 0
      pom.xml
  2. 301 396
      src/main/java/com/gmail/nossr50/database/SQLDatabaseManager.java

+ 10 - 0
pom.xml

@@ -76,6 +76,7 @@
                     <artifactSet>
                         <includes>
                             <include>com.turt2live.metrics:MetricsExtension</include>
+                            <include>net.snaq:dbpool</include>
                         </includes>
                     </artifactSet>
                     <relocations>
@@ -83,6 +84,10 @@
                             <pattern>com.turt2live.metrics</pattern>
                             <shadedPattern>com.gmail.nossr50.metrics.mcstats</shadedPattern>
                         </relocation>
+                        <relocation>
+                            <pattern>net.snaq</pattern>
+                            <shadedPattern>com.gmail.nossr50.dbpool</shadedPattern>
+                        </relocation>
                     </relocations>
                 </configuration>
                 <executions>
@@ -136,6 +141,11 @@
             <artifactId>MetricsExtension</artifactId>
             <version>0.0.5-SNAPSHOT</version>
         </dependency>
+        <dependency>
+            <groupId>net.snaq</groupId>
+            <artifactId>dbpool</artifactId>
+            <version>5.1</version>
+        </dependency>
     </dependencies>
     <distributionManagement>
         <repository>

File diff suppressed because it is too large
+ 301 - 396
src/main/java/com/gmail/nossr50/database/SQLDatabaseManager.java


Some files were not shown because too many files changed in this diff