Refine search
@Override public void unbind(String name) { if (logger.isInfoEnabled()) { logger.info("Static JNDI remove: [" + this.root + name + "]"); } this.boundObjects.remove(this.root + name); }
return; if (logger.isDebugEnabled()) { logger.debug("Stopping beans in phase " + this.phase); if (latch.getCount() > 0 && !countDownBeanNames.isEmpty() && logger.isInfoEnabled()) { logger.info("Failed to shut down " + countDownBeanNames.size() + " bean" + (countDownBeanNames.size() > 1 ? "s" : "") + " with phase value " + this.phase + " within timeout of " + this.timeout + ": " + countDownBeanNames);
@Override public boolean isEnabled(final Level level) { switch (level) { case TRACE: return logger.isTraceEnabled(); case DEBUG: return logger.isDebugEnabled(); case INFO: return logger.isInfoEnabled(); case WARN: return logger.isWarnEnabled(); case ERROR: return logger.isErrorEnabled(); default: throw new IllegalArgumentException(); } }
private void initFactories(List<RoutePredicateFactory> predicates) { predicates.forEach(factory -> { String key = factory.name(); if (this.predicates.containsKey(key)) { this.logger.warn("A RoutePredicateFactory named "+ key + " already exists, class: " + this.predicates.get(key) + ". It will be overwritten."); } this.predicates.put(key, factory); if (logger.isInfoEnabled()) { logger.info("Loaded RoutePredicateFactory [" + key + "]"); } }); }
@Override public final void stop() { synchronized (this.lifecycleMonitor) { if (isRunning()) { if (logger.isInfoEnabled()) { logger.info("Stopping " + getClass().getSimpleName()); } try { stopInternal(); } catch (Throwable ex) { logger.error("Failed to stop WebSocket connection", ex); } finally { this.running = false; } } } }
logger.debug("Could not find unique TaskExecutor bean", ex); try { return beanFactory.getBean(DEFAULT_TASK_EXECUTOR_BEAN_NAME, Executor.class); if (logger.isInfoEnabled()) { logger.info("More than one TaskExecutor bean found within the context, and none is named " + "'taskExecutor'. Mark one of them as primary or name it 'taskExecutor' (possibly " + "as an alias) in order to use it for async processing: " + ex.getBeanNamesFound()); logger.debug("Could not find default TaskExecutor bean", ex); try { return beanFactory.getBean(DEFAULT_TASK_EXECUTOR_BEAN_NAME, Executor.class); logger.info("No task executor bean found for async processing: " + "no bean of type TaskExecutor and no bean named 'taskExecutor' either");
if (logger.isDebugEnabled()) { logger.debug("Cannot search for matching files underneath " + rootDirResource + " in the file system: " + ex.getMessage()); if (logger.isInfoEnabled()) { logger.info("Failed to resolve " + rootDirResource + " in the file system: " + ex);
public OAuth2RefreshToken readRefreshToken(String token) { OAuth2RefreshToken refreshToken = null; try { refreshToken = jdbcTemplate.queryForObject(selectRefreshTokenSql, new RowMapper<OAuth2RefreshToken>() { public OAuth2RefreshToken mapRow(ResultSet rs, int rowNum) throws SQLException { return deserializeRefreshToken(rs.getBytes(2)); } }, extractTokenKey(token)); } catch (EmptyResultDataAccessException e) { if (LOG.isInfoEnabled()) { LOG.info("Failed to find refresh token for token " + token); } } catch (IllegalArgumentException e) { LOG.warn("Failed to deserialize refresh token for token " + token, e); removeRefreshToken(token); } return refreshToken; }
/** * Detect a default properties file for the supplied class, as specified * in the class-level Javadoc for {@link TestPropertySource}. */ private static String detectDefaultPropertiesFile(Class<?> testClass) { String resourcePath = ClassUtils.convertClassNameToResourcePath(testClass.getName()) + ".properties"; String prefixedResourcePath = ResourceUtils.CLASSPATH_URL_PREFIX + resourcePath; ClassPathResource classPathResource = new ClassPathResource(resourcePath); if (classPathResource.exists()) { if (logger.isInfoEnabled()) { logger.info(String.format("Detected default properties file \"%s\" for test class [%s]", prefixedResourcePath, testClass.getName())); } return prefixedResourcePath; } else { String msg = String.format("Could not detect default properties file for test [%s]: " + "%s does not exist. Either declare the 'locations' or 'properties' attributes " + "of @TestPropertySource or make the default properties file available.", testClass.getName(), classPathResource); logger.error(msg); throw new IllegalStateException(msg); } }
/** * Bind the given object under the given name, for all naming contexts * that this context builder will generate. * @param name the JNDI name of the object (e.g. "java:comp/env/jdbc/myds") * @param obj the object to bind (e.g. a DataSource implementation) */ public void bind(String name, Object obj) { if (logger.isInfoEnabled()) { logger.info("Static JNDI binding: [" + name + "] = [" + obj + "]"); } this.boundObjects.put(name, obj); }
logger.debug("Defaulting to no synonyms in table meta-data lookup"); super.initializeWithTableColumnMetaData(databaseMetaData, catalogName, schemaName, tableName); return; logger.info("Unable to include synonyms in table meta-data lookup - no Connection from DatabaseMetaData"); super.initializeWithTableColumnMetaData(databaseMetaData, catalogName, schemaName, tableName); return; if (logger.isInfoEnabled()) { logger.info("Unable to include synonyms in table meta-data lookup - no Oracle Connection: " + ex); logger.debug("Including synonyms in table meta-data lookup"); Method setIncludeSynonyms; Boolean originalValueForIncludeSynonyms;
if (loggerToUse.isDebugEnabled()) { loggerToUse.debug("Failed to meta-introspect annotation " + element + ": " + ex); if (loggerToUse.isInfoEnabled()) { loggerToUse.info("Failed to introspect annotations on " + element + ": " + ex);
public OAuth2AccessToken readAccessToken(String tokenValue) { OAuth2AccessToken accessToken = null; try { accessToken = jdbcTemplate.queryForObject(selectAccessTokenSql, new RowMapper<OAuth2AccessToken>() { public OAuth2AccessToken mapRow(ResultSet rs, int rowNum) throws SQLException { return deserializeAccessToken(rs.getBytes(2)); } }, extractTokenKey(tokenValue)); } catch (EmptyResultDataAccessException e) { if (LOG.isInfoEnabled()) { LOG.info("Failed to find access token for token " + tokenValue); } } catch (IllegalArgumentException e) { LOG.warn("Failed to deserialize access token for " + tokenValue, e); removeAccessToken(tokenValue); } return accessToken; }
if (logger.isInfoEnabled()) { logger.info(String.format("Detected default SQL script \"%s\" for test %s [%s]", prefixedResourcePath, elementType, elementName)); "%s does not exist. Either declare statements or scripts via @Sql or make the " + "default SQL script available.", elementType, elementName, classPathResource); logger.error(msg); throw new IllegalStateException(msg);
/** * Drop the specified tables. * @param jdbcTemplate the JdbcTemplate with which to perform JDBC operations * @param tableNames the names of the tables to drop */ public static void dropTables(JdbcTemplate jdbcTemplate, String... tableNames) { for (String tableName : tableNames) { jdbcTemplate.execute("DROP TABLE " + tableName); if (logger.isInfoEnabled()) { logger.info("Dropped table " + tableName); } } }
/** * Invoked when any TCP connectivity issue is detected, i.e. failure to establish * the TCP connection, failure to send a message, missed heartbeat, etc. */ protected void handleTcpConnectionFailure(String error, @Nullable Throwable ex) { if (logger.isInfoEnabled()) { logger.info("TCP connection failure in session " + this.sessionId + ": " + error, ex); } try { sendStompErrorFrameToClient(error); } finally { try { clearConnection(); } catch (Throwable ex2) { if (logger.isDebugEnabled()) { logger.debug("Failure while clearing TCP connection state in session " + this.sessionId, ex2); } } } }
public OAuth2Authentication readAuthentication(String token) { OAuth2Authentication authentication = null; try { authentication = jdbcTemplate.queryForObject(selectAccessTokenAuthenticationSql, new RowMapper<OAuth2Authentication>() { public OAuth2Authentication mapRow(ResultSet rs, int rowNum) throws SQLException { return deserializeAuthentication(rs.getBytes(2)); } }, extractTokenKey(token)); } catch (EmptyResultDataAccessException e) { if (LOG.isInfoEnabled()) { LOG.info("Failed to find access token for token " + token); } } catch (IllegalArgumentException e) { LOG.warn("Failed to deserialize authentication for " + token, e); removeAccessToken(token); } return authentication; }
@Override protected void openConnection() { this.taskExecutor.execute(() -> { try { if (logger.isInfoEnabled()) { logger.info("Connecting to WebSocket at " + getUri()); } Object endpointToUse = this.endpoint; if (endpointToUse == null) { Assert.state(this.endpointProvider != null, "No endpoint set"); endpointToUse = this.endpointProvider.getHandler(); } this.session = this.webSocketContainer.connectToServer(endpointToUse, getUri()); logger.info("Successfully connected to WebSocket"); } catch (Throwable ex) { logger.error("Failed to connect to WebSocket", ex); } }); }
protected void publishBrokerAvailableEvent() { boolean shouldPublish = this.brokerAvailable.compareAndSet(false, true); if (this.eventPublisher != null && shouldPublish) { if (logger.isInfoEnabled()) { logger.info(this.availableEvent); } this.eventPublisher.publishEvent(this.availableEvent); } }
/** * Unbind the RMI service from the registry on bean factory shutdown. */ @Override public void destroy() throws RemoteException { if (logger.isDebugEnabled()) { logger.debug("Unbinding RMI service '" + this.serviceName + "' from registry" + (this.createdRegistry ? (" at port '" + this.registryPort + "'") : "")); } try { this.registry.unbind(this.serviceName); } catch (NotBoundException ex) { if (logger.isInfoEnabled()) { logger.info("RMI service '" + this.serviceName + "' is not bound to registry" + (this.createdRegistry ? (" at port '" + this.registryPort + "' anymore") : ""), ex); } } finally { unexportObjectSilently(); } }