Browse Source

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 years ago
parent
commit
a3066803d0
2 changed files with 311 additions and 396 deletions
  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