use of org.talend.repository.nosql.exceptions.NoSQLReflectionException in project tbd-studio-se by Talend.
the class Neo4jConnectionUtil method getQueryEngine.
private static Object getQueryEngine(Object db, ClassLoader classLoader) throws NoSQLReflectionException {
Object qe = queryEngine;
if (qe != null) {
return qe;
}
// $NON-NLS-1$
Object restAPI = NoSQLReflection.invokeMethod(db, "getRestAPI", new Object[0]);
try {
qe = // $NON-NLS-1$
NoSQLReflection.newInstance(// $NON-NLS-1$
"org.neo4j.rest.graphdb.query.RestCypherQueryEngine", new Object[] { restAPI }, classLoader, // $NON-NLS-1$
Class.forName("org.neo4j.rest.graphdb.RestAPI", true, classLoader));
} catch (ClassNotFoundException e) {
throw new NoSQLReflectionException(e);
}
return queryEngine = qe;
}
use of org.talend.repository.nosql.exceptions.NoSQLReflectionException in project tbd-studio-se by Talend.
the class CassandraOldVersionMetadataHandler method closeConnections.
@Override
public void closeConnections() throws NoSQLServerException {
try {
if (cluster != null) {
// $NON-NLS-1$
Object connMgr = NoSQLReflection.invokeMethod(cluster, "getConnectionManager");
// $NON-NLS-1$
NoSQLReflection.invokeMethod(connMgr, "shutdown");
cluster = null;
}
} catch (NoSQLReflectionException e) {
throw new NoSQLServerException(e);
}
}
Aggregations