@Override public void destroy() throws Exception { if (client != null) { client.release(); } }
@Override public void close() throws IOException { if (!settings.isReferencedConnectionUsed) { connectionClient.release(); } }
@Override public void destroy() { if (client != null) { if (logger.isInfoEnabled()) { logger.info("Releasing client with username: " + config.getUsername()); } client.release(); } }
@Override public void waitForCompletion() { super.waitForCompletion(); if (databaseClients != null && releaseDatabaseClients) { logger.info("Releasing DatabaseClient instances..."); for (DatabaseClient client : databaseClients) { client.release(); } logger.info("Finished releasing DatabaseClient instances"); } }
@Override public void release() { for ( DatabaseClient client : clientMap.values() ) { try { // don't release the primaryClient because we didn't create it, it was provided to us if ( primaryClient != client ) client.release(); } catch (Throwable t) { logger.error("Failed to release client for host \"" + client.getHost() + "\"", t); } } }
@Override public void runAtDriver(RuntimeContainer container) { if (container != null) { DatabaseClient containerClient = (DatabaseClient) container.getComponentData(properties.getReferencedComponentId(), MarkLogicConnection.CONNECTION); if (containerClient != null) { containerClient.release(); LOGGER.info("Connection released"); } } }
@Override public Result close() throws IOException { if (!inputProperties.connection.isReferencedConnectionUsed()) { client.release(); } return new ResultWithLongNB(uId, totalCounter); }
@Override public Result close() throws IOException { if (!properties.connection.isReferencedConnectionUsed()) { connectionClient.release(); LOGGER.info(MESSAGES.getMessage("info.connectionClosed")); } writeLegacyNBLineResult(); return result; }
@After public void tearDown() throws Exception { System.out.println("Running clear script"); // release client client.release(); }
@After public void tearDown() throws Exception { // release client client.release(); }
@After public void tearDown() throws Exception { System.out.println("Running clear script"); // release client client.release(); }
@After public void tearDown() throws Exception { System.out.println("Running clear script"); // release client client.release(); }
/** * @throws java.lang.Exception */ @After public void tearDown() throws Exception { System.out.println("Running clear script"); // release client client.release(); }
@After public void testCleanUp() throws Exception { System.out.println("Running CleanUp script"); // release client client.release(); }
@After public void testCleanUp() throws Exception { System.out.println("Running CleanUp script"); // release client client.release(); }
@After public void tearDown() throws Exception { // release client client.release(); }
@AfterClass public static void tearDown() throws Exception { System.out.println("In tear down"); // set content version back to none configMgr.setUpdatePolicy(UpdatePolicy.VERSION_OPTIONAL); // write the server configuration to the database configMgr.writeConfiguration(); // release client client.release(); cleanupRESTServer(dbName, fNames); } }
@Test public void testNPE() throws KeyManagementException, NoSuchAlgorithmException, IOException, SAXException, ParserConfigurationException { System.out.println("Running testNPE"); // connect the client DatabaseClient client = getDatabaseClient("rest-admin", "x", getConnType()); QueryOptionsListHandle handle = new QueryOptionsListHandle(); Map map = handle.getValuesMap(); // release client client.release(); }
@AfterClass public static void tearDownAfterClass() throws Exception { System.out.println("In tear down"); deleteUserRole("apiRole"); deleteRESTUser("apiUser"); deleteRESTUser("secondApiUser"); deleteUserRole("ForbiddenRole"); deleteRESTUser("ForbiddenUser"); associateRESTServerWithDB(modServerName, "Documents"); // release client dbclient.release(); }