Last active
December 10, 2015 00:09
-
-
Save gamlerhart/4349067 to your computer and use it in GitHub Desktop.
ADBCJ updates
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
libraryDependencies += "org.adbcj" % "adbcj-connection-pool" % "0.5-SNAPSHOT" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
libraryDependencies += "org.adbcj" % "h2-async-driver" % "0.5-SNAPSHOT" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Map<String,String> poolConfig = new HashMap<String, String>(); | |
poolConfig.put("pool.maxConnections","50"); | |
poolConfig.put("pool.maxWaitForConnection","500"); | |
ConnectionManager pooledMysql | |
= ConnectionManagerProvider.createConnectionManager( | |
"adbcj:pooled:mysql://localhost/adbcjtck", | |
"root", | |
"", | |
poolConfig); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ConnectionManager plainMysql | |
= ConnectionManagerProvider.createConnectionManager( | |
"adbcj:mysql://localhost/adbcjtck", "root", ""); | |
ConnectionManager pooledMysql | |
= ConnectionManagerProvider.createConnectionManager( | |
"adbcj:pooled:mysql://localhost/adbcjtck", "root", ""); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Plain connection | |
ConnectionManager h2 | |
= ConnectionManagerProvider.createConnectionManager( | |
"adbcj:h2://localhost:14242/adbcjtck;MVCC=TRUE", | |
"sa", | |
"sa"); | |
// With connection pool, recommended | |
ConnectionManager h2Pooled | |
= ConnectionManagerProvider.createConnectionManager( | |
"adbcj:pooled:h2://localhost:14242/adbcjtck;MVCC=TRUE", | |
"sa", | |
"sa"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<dependency> | |
<groupId>org.adbcj</groupId> | |
<artifactId>adbcj-connection-pool</artifactId> | |
<version>0.5-SNAPSHOT</version> | |
</dependency> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<dependency> | |
<groupId>org.adbcj</groupId> | |
<artifactId>h2-async-driver</artifactId> | |
<version>0.5-SNAPSHOT</version> | |
</dependency> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment