Refine search
public void postRegister(Boolean registrationDone) { if (!registrationDone.booleanValue()) { log.debug("Registration is not done -> stop"); stop(); } else { state = REGISTERED; if (createIgnored) { try { create(); } catch (Exception e) { log.error(ServiceMBeanLogger.ROOT_LOGGER.postRegisterInitializationFailed(), e); } } } }
public void channelOpened(Channel channel) { log.trace("Channel Opened"); try { writeVersionHeader(channel, false); channel.receiveMessage(new ClientVersionReceiver(serverMessageInterceptorFactory.create(channel))); } catch (IOException e) { log.error("Unable to send header, closing channel", e); IoUtils.safeClose(channel); } }
@Override public void log(String fqcn, Level level, Throwable t, String format, Object... arguments) { switch (level) { case TRACE: logger.trace(fqcn, StrUtil.format(format, arguments), t); break; case DEBUG: logger.debug(fqcn, StrUtil.format(format, arguments), t); break; case INFO: logger.info(fqcn, StrUtil.format(format, arguments), t); break; case WARN: logger.warn(fqcn, StrUtil.format(format, arguments), t); break; case ERROR: logger.error(fqcn, StrUtil.format(format, arguments), t); break; default: throw new Error(StrUtil.format("Can not identify level: {}", level)); } } }
@Override public void log(String fqcn, Level level, Throwable t, String format, Object... arguments) { switch (level) { case TRACE: logger.trace(fqcn, StrUtil.format(format, arguments), t); break; case DEBUG: logger.debug(fqcn, StrUtil.format(format, arguments), t); break; case INFO: logger.info(fqcn, StrUtil.format(format, arguments), t); break; case WARN: logger.warn(fqcn, StrUtil.format(format, arguments), t); break; case ERROR: logger.error(fqcn, StrUtil.format(format, arguments), t); break; default: throw new Error(StrUtil.format("Can not identify level: {}", level)); } } }
protected boolean sendUnregistrationEvent(KeycloakDeployment deployment) { log.debug("Sending Unregistration event right now"); String host = HostUtils.getHostName(); try { ServerRequest.invokeUnregisterNode(deployment, host); log.debugf("Node '%s' successfully unregistered from Keycloak", host); return true; } catch (ServerRequest.HttpFailure failure) { log.error("failed to unregister node from keycloak"); log.error("status from server: " + failure.getStatus()); if (failure.getError() != null) { log.error(" " + failure.getError()); } return false; } catch (IOException e) { log.error("failed to unregister node from keycloak", e); return false; } }
/** * */ protected void handleRemoteDisconnect() { log.debug("entering handleRemoteDisconnect()"); switch (connectionState) { case OPEN: connectionState = CONNECTION_RESET; return; default: connectionState = CLOSED; log.error("invalid connection state in handleRemoteDisconnect(): " + connectionState); } }
private void sendRequest(KeycloakDeployment deployment) { if (log.isTraceEnabled()) { log.trace("Going to send request to retrieve new set of realm public keys for client " + deployment.getResourceName()); } HttpGet getMethod = new HttpGet(deployment.getJwksUrl()); try { JSONWebKeySet jwks = HttpAdapterUtils.sendJsonHttpRequest(deployment, getMethod, JSONWebKeySet.class); Map<String, PublicKey> publicKeys = JWKSUtils.getKeysForUse(jwks, JWK.Use.SIG); if (log.isDebugEnabled()) { log.debug("Realm public keys successfully retrieved for client " + deployment.getResourceName() + ". New kids: " + publicKeys.keySet().toString()); } // Update current keys currentKeys.clear(); currentKeys.putAll(publicKeys); } catch (HttpClientAdapterException e) { log.error("Error when sending request to retrieve realm keys", e); } } }
private void load(File file) { if (file.canRead()) { log.trace("Loading " + file.getName() + " ..."); try { FileReader fr = new FileReader(file); BufferedReader br = new BufferedReader(fr); while (br.ready()) { String line = br.readLine(); StringTokenizer st = new StringTokenizer(line, "\n\r\t ,"); while (st.hasMoreTokens()) { addItem(st.nextToken()); } } br.close(); } catch (Exception ex) { log.error("Exception", ex); } } else { log.error("Cannot read " + file.getName()); } }
@Override public void log(String fqcn, Level level, Throwable t, String format, Object... arguments) { switch (level) { case TRACE: logger.trace(fqcn, StrUtil.format(format, arguments), t); break; case DEBUG: logger.debug(fqcn, StrUtil.format(format, arguments), t); break; case INFO: logger.info(fqcn, StrUtil.format(format, arguments), t); break; case WARN: logger.warn(fqcn, StrUtil.format(format, arguments), t); break; case ERROR: logger.error(fqcn, StrUtil.format(format, arguments), t); break; default: throw new Error(StrUtil.format("Can not identify level: {}", level)); } } }
/** * Break the association between the JTA transaction context and the calling Thread. * * @return true on success, false on error */ private boolean suspendTransaction() { txbridgeLogger.logger.trace("JaxWSTxInboundBridgeHandler.suspendTransaction()"); try { inboundBridge.stop(); } catch (Exception e) { txbridgeLogger.logger.error(e); return false; } return true; } }
public void error() { // Mark for tollback TX via TM try { if (trace) log.trace(JmsServerSession.this+ " using TM to mark TX for rollback tx=" + trans); trans.setRollbackOnly(); } catch (Throwable t) { log.error(JmsServerSession.this + " failed to set rollback only", t); } //even if the rollback fails on the transaction, we want to rollback the session. try { session.rollback(); } catch (JMSException e) { log.error(JmsServerSession.this + " failed to rollback the transacted session", e); } }
@SuppressWarnings("unchecked") public void setCurrentState(Serializable newState) { this.log.debug("Receiving state of HASessionState"); try { Map<String, ConcurrentMap<Object, PackagedSession>> map = (Map) this.inflate((byte[]) newState); synchronized (this.appSessionMap) { this.appSessionMap.clear(); this.appSessionMap.putAll(map); } } catch (IOException e) { this.log.error("operation failed", e); } }