Java Code Examples for io.vertx.sqlclient.Pool#pool()
The following examples show how to use
io.vertx.sqlclient.Pool#pool() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SqlClientPool.java From hibernate-reactive with GNU Lesser General Public License v2.1 | 6 votes |
protected Pool configurePool(Map configurationValues, Vertx vertx) { URI uri = jdbcUrl(configurationValues); SqlConnectOptions connectOptions = sqlConnectOptions( uri ); PoolOptions poolOptions = poolOptions( configurationValues ); try { // First try to load the Pool using the standard ServiceLoader pattern // This only works if exactly 1 Driver is on the classpath. return Pool.pool( vertx, connectOptions, poolOptions ); } catch (ServiceConfigurationError e) { // Backup option if multiple drivers are on the classpath. // We will be able to remove this once Vertx 3.9.2 is available return findDriver( uri, e ).createPool( vertx, connectOptions, poolOptions ); } }
Example 2
Source File: DriverTestBase.java From vertx-sql-client with Apache License 2.0 | 4 votes |
@Test(expected = ServiceConfigurationError.class) public void testRejectCreatePool01(TestContext ctx) { Pool.pool(new BogusOptions()); }
Example 3
Source File: DriverTestBase.java From vertx-sql-client with Apache License 2.0 | 4 votes |
@Test(expected = ServiceConfigurationError.class) public void testRejectCreatePool02(TestContext ctx) { Pool.pool(new BogusOptions(), new PoolOptions()); }
Example 4
Source File: DriverTestBase.java From vertx-sql-client with Apache License 2.0 | 4 votes |
@Test(expected = ServiceConfigurationError.class) public void testRejectCreatePool03(TestContext ctx) { Pool.pool(Vertx.vertx(), new BogusOptions(), new PoolOptions()); }