public static <G extends Graph> G open(final Configuration configuration) { SqlgDataSource dataSource = createDataSource(configuration); try { return open(configuration, dataSource); } catch (Exception ex) { dataSource.close(); throw ex; } }
public static <G extends Graph> G open(final Configuration configuration) { SqlgDataSource dataSource = createDataSource(configuration); try { return open(configuration, dataSource); } catch (Exception ex) { dataSource.close(); throw ex; } }
@Override public void close() { logger.debug(String.format("Closing graph. Connection url = %s, maxPoolSize = %d", this.configuration.getString(JDBC_URL), configuration.getInt("maxPoolSize", 100))); if (this.tx().isOpen()) this.tx().close(); this.topology.close(); this.sqlgDataSource.close(); }
@Override public void close() { logger.debug(String.format("Closing graph. Connection url = %s, maxPoolSize = %d", this.configuration.getString(JDBC_URL), configuration.getInt("maxPoolSize", 100))); if (this.tx().isOpen()) this.tx().close(); this.topology.close(); this.sqlgDataSource.close(); }
public static <G extends Graph> G open(final String pathToSqlgProperties) { if (null == pathToSqlgProperties) throw Graph.Exceptions.argumentCanNotBeNull("pathToSqlgProperties"); Configuration configuration; try { configuration = new PropertiesConfiguration(pathToSqlgProperties); SqlgDataSource dataSource = createDataSource(configuration); try { return open(configuration, dataSource); } catch (Exception ex) { dataSource.close(); throw ex; } } catch (ConfigurationException e) { throw new RuntimeException(e); } }
public static <G extends Graph> G open(final String pathToSqlgProperties) { if (null == pathToSqlgProperties) throw Graph.Exceptions.argumentCanNotBeNull("pathToSqlgProperties"); Configuration configuration; try { configuration = new PropertiesConfiguration(pathToSqlgProperties); SqlgDataSource dataSource = createDataSource(configuration); try { return open(configuration, dataSource); } catch (Exception ex) { dataSource.close(); throw ex; } } catch (ConfigurationException e) { throw new RuntimeException(e); } }