if (getLogger().isDebugEnabled()) { getLogger().debug(this + ": Starting"); init(); } catch (Throwable t) { getLogger().error(t.getMessage(), t);
private void load(Wrapper wrapper) { try { wrapper.load(); } catch (ServletException ex) { String message = sm.getString("standardContext.loadOnStartup.loadException", getName(), wrapper.getName()); if (getComputedFailCtxIfServletStartFails()) { throw new WebServerException(message, ex); } getLogger().error(message, StandardWrapper.getRootCause(ex)); } }
private static void logFull(Log loghelper, int currentThreadCount, int maxThreads) { if( logfull ) { log.error(sm.getString("threadpool.busy", new Integer(currentThreadCount), new Integer(maxThreads))); logfull=false; } else if( log.isDebugEnabled() ) { log.debug("All threads are busy " + currentThreadCount + " " + maxThreads ); } }
private void process() { Set<BackgroundProcess> currentProcesses = new HashSet<>(); synchronized (processesLock) { currentProcesses.addAll(processes); } for (BackgroundProcess process : currentProcesses) { try { process.backgroundProcess(); } catch (Throwable t) { ExceptionUtils.handleThrowable(t); log.error(sm.getString( "backgroundProcessManager.processFailed"), t); } } }
private boolean checkOverflow(int numBytes) { if (pos + numBytes + 3 > buf.length) { log.error(sm.getString("ajpmessage.overflow", "" + numBytes, "" + pos), new ArrayIndexOutOfBoundsException()); if (log.isDebugEnabled()) { dump("Overflow/coBytes"); } return true; } return false; }
@Override public void remove(Session session, boolean update) { log.debug("Removing session ID : " + session.getId()); try { getClient().delete(generateRedisSessionKey(session.getId())); } catch (Throwable t) { log.error("Failed to remove session [" + session.getId() + "]", t); } currentSessionState.remove(); }
/** * Close any open connection to the directory server for this Realm. * * @param context The directory context to be closed */ protected void close(DirContext context) { // Do nothing if there is no opened connection if (context == null) return; // Close our opened connection try { if (containerLog.isDebugEnabled()) containerLog.debug("Closing directory context"); context.close(); } catch (NamingException e) { containerLog.error(sm.getString("jndiRealm.close"), e); } this.context = null; }
private void process() { Set<BackgroundProcess> currentProcesses = new HashSet<>(); synchronized (processesLock) { currentProcesses.addAll(processes); } for (BackgroundProcess process : currentProcesses) { try { process.backgroundProcess(); } catch (Throwable t) { ExceptionUtils.handleThrowable(t); log.error(sm.getString( "backgroundProcessManager.processFailed"), t); } } }
getLogger().debug("Query: " + query.getQueryString()); results = (SelectResults) query.execute(); } catch (Exception ex) { getLogger().error("Unable to perform query during doUnload", ex); return; getLogger().debug("No sessions to unload for context " + context.getPath()); return; // nothing to do return; if (getLogger().isDebugEnabled()) { getLogger().debug("Unloading sessions to " + store.getAbsolutePath()); } catch (IOException e) { error = true; getLogger().error("Exception unloading sessions", e); throw e; } finally { getLogger().error("Exception unloading sessions", e); try { oos.close(); if (getLogger().isDebugEnabled()) { getLogger().debug("Locally destroying session " + session.getId());
/** * Close any open connection to the directory server for this Realm. * * @param context The directory context to be closed */ protected void close(DirContext context) { // Do nothing if there is no opened connection if (context == null) return; // Close our opened connection try { if (containerLog.isDebugEnabled()) containerLog.debug("Closing directory context"); context.close(); } catch (NamingException e) { containerLog.error(sm.getString("jndiRealm.close"), e); } this.context = null; }
private void process() { Set<BackgroundProcess> currentProcesses = new HashSet<>(); synchronized (processesLock) { currentProcesses.addAll(processes); } for (BackgroundProcess process : currentProcesses) { try { process.backgroundProcess(); } catch (Throwable t) { ExceptionUtils.handleThrowable(t); log.error(sm.getString( "backgroundProcessManager.processFailed"), t); } } }
getLogger().debug("No session store file found"); return; if (getLogger().isDebugEnabled()) { getLogger().debug("Loading sessions from " + store.getAbsolutePath()); if (getLogger().isDebugEnabled()) { getLogger().debug("Creating custom object input stream for class loader"); if (getLogger().isDebugEnabled()) { getLogger().debug("Creating standard object input stream"); getLogger().error("Exception loading sessions", e); try { fis.close(); getLogger().error(e); try { ois.close(); getLogger().error(e); try { ois.close();
/** * Close any open connection to the directory server for this Realm. * * @param context The directory context to be closed */ protected void close(DirContext context) { // Do nothing if there is no opened connection if (context == null) return; // Close our opened connection try { if (containerLog.isDebugEnabled()) containerLog.debug("Closing directory context"); context.close(); } catch (NamingException e) { containerLog.error(sm.getString("jndiRealm.close"), e); } this.context = null; }
private void process() { Set<BackgroundProcess> currentProcesses = new HashSet<BackgroundProcess>(); synchronized (processesLock) { currentProcesses.addAll(processes); } for (BackgroundProcess process : currentProcesses) { try { process.backgroundProcess(); } catch (Throwable t) { ExceptionUtils.handleThrowable(t); log.error(sm.getString( "backgroundProcessManager.processFailed"), t); } } }
public void stopInternal() throws LifecycleException { super.stopInternal(); if (getLogger().isDebugEnabled()) { getLogger().debug(this + ": Stopping"); unload(); } catch (IOException e) { getLogger().error("Unable to unload sessions", e);
/** * Remove the specified environment entry from the naming context. * * @param name the name of the environment entry which should be removed */ public void removeEnvironment(String name) { try { envCtx.unbind(name); } catch (NamingException e) { log.error(sm.getString("naming.unbindFailed", e)); } }
/** * Close any open connection to the directory server for this Realm. * * @param context The directory context to be closed */ protected void close(DirContext context) { // Do nothing if there is no opened connection if (context == null) return; // Close our opened connection try { if (containerLog.isDebugEnabled()) containerLog.debug("Closing directory context"); context.close(); } catch (NamingException e) { containerLog.error(sm.getString("jndiRealm.close"), e); } this.context = null; }
/** * Move a current but rotated log file back to the unrotated * one. Needed if date stamp inclusion is deferred to rotation * time. */ private void restore() { File newLogFile = getLogFile(false); File rotatedLogFile = getLogFile(true); if (rotatedLogFile.exists() && !newLogFile.exists() && !rotatedLogFile.equals(newLogFile)) { try { if (!rotatedLogFile.renameTo(newLogFile)) { log.error(sm.getString("accessLogValve.renameFail", rotatedLogFile, newLogFile)); } } catch (Throwable e) { ExceptionUtils.handleThrowable(e); log.error(sm.getString("accessLogValve.renameFail", rotatedLogFile, newLogFile), e); } } }