protected void deleteTenantAndPlatform() throws BonitaException { LOGGER.info("========= CLEAN PLATFORM ======="); final PlatformSession session = loginOnPlatform(); final PlatformAPI platformAPI = getPlatformAPI(session); if (platformAPI.isNodeStarted()) { platformAPI.stopNode(); if (dropOnStop) { platformAPI.cleanPlatform(); } } logoutOnPlatform(session); }
protected void stopAndStartPlatform() throws BonitaException { final PlatformSession loginPlatform = loginOnPlatform(); final PlatformAPI platformAPI = PlatformAPIAccessor.getPlatformAPI(loginPlatform); platformAPI.stopNode(); platformAPI.startNode(); logoutOnPlatform(loginPlatform); }
public void unloadEngine() throws Exception { LOGGER.log(Level.INFO, "Stopping Bonita Engine..."); // create a session to call the engine final SessionAccessor sessionAccessor = getSessionAccessor(); PlatformSessionService platformSessionService = getPlatformSessionService(); final long sessionId = createPlatformSession(platformSessionService, sessionAccessor); final PlatformAPI platformAPI = getPlatformAPI(); try { if (!platformAPI.isNodeStarted()) { LOGGER.log(Level.INFO, "Node is not started, nothing to do."); return; } LOGGER.log(Level.INFO, "Stopping node..."); platformAPI.stopNode(); } catch (final Throwable e) { LOGGER.log(Level.SEVERE, "Issue while stopping the platform", e); } finally { deletePlatformSession(platformSessionService, sessionAccessor, sessionId); // after that the engine is unloaded getServiceAccessorFactory().destroyAccessors(); LOGGER.log(Level.INFO, "Bonita Engine stopped!"); } }
public void unloadEngine() throws Exception { LOGGER.log(Level.INFO, "Stopping Bonita Engine..."); // create a session to call the engine final SessionAccessor sessionAccessor = getSessionAccessor(); PlatformSessionService platformSessionService = getPlatformSessionService(); final long sessionId = createPlatformSession(platformSessionService, sessionAccessor); final PlatformAPI platformAPI = getPlatformAPI(); try { if (!platformAPI.isNodeStarted()) { LOGGER.log(Level.INFO, "Node is not started, nothing to do."); return; } LOGGER.log(Level.INFO, "Stopping node..."); platformAPI.stopNode(); } catch (final Throwable e) { LOGGER.log(Level.SEVERE, "Issue while stopping the platform", e); } finally { deletePlatformSession(platformSessionService, sessionAccessor, sessionId); // after that the engine is unloaded getServiceAccessorFactory().destroyAccessors(); LOGGER.log(Level.INFO, "Bonita Engine stopped!"); } }