public class JDBCConnector extends Object implements DBConnector
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
boolean |
connect()
Keeps a permanent connection to the DB (if enabled in the settings).
|
OntopConnection |
getConnection()
Returns an OntopConnection, the main object that a client should use to
access the query answering services of Quest.
|
Connection |
getSQLPoolConnection() |
public boolean connect()
throws OntopConnectionException
connect in interface DBConnectorOntopConnectionExceptionpublic void close()
close in interface DBConnectorclose in interface AutoCloseablepublic Connection getSQLPoolConnection() throws OntopConnectionException
OntopConnectionExceptionpublic OntopConnection getConnection() throws OntopConnectionException
Note, the OntopConnection is not a normal JDBC connection. It is a wrapper of one of the N JDBC connections that quest's connection pool starts on initialization. Calling .close() will not actually close the connection, with will just release it back to the pool.
to close all connections you must call DBConnector.close().
getConnection in interface DBConnectorOntopConnectionExceptionCopyright © 2009–2020 Free University of Bozen-Bolzano. All rights reserved.