Examples of ADFLogger


Examples of oracle.adf.share.logging.ADFLogger

     * @param context the message context
     * @see #getServiceLogger
     */
    public void handleRequest(final SOAPMessageContext context) {
        // logging
        final ADFLogger logger = getServiceLogger(context);
        if (logger.isLoggable(LOG_LEVEL)) {
            logger.log(LOG_LEVEL, "invoking {0} at {1}", new Object[] {
                       fullOperationName(context), context.get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY) });
            final String payload = prettyXml(context.getMessage());
            logger.log(LOG_LEVEL, "request payload\n{0}", payload);
            // start performance timer with all details (can be viewed in FMW Control)
            final HashMap<String, String> logContext = new HashMap<String, String>();
            logContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
                           String.valueOf(context.get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY)));
            logContext.put(MessageContext.WSDL_INTERFACE, String.valueOf(context.get(MessageContext.WSDL_INTERFACE)));
            logContext.put(MessageContext.WSDL_OPERATION, String.valueOf(context.get(MessageContext.WSDL_OPERATION)));
            logContext.put(MessageContext.WSDL_PORT, String.valueOf(context.get(MessageContext.WSDL_PORT)));
            logContext.put(MessageContext.WSDL_SERVICE, String.valueOf(context.get(MessageContext.WSDL_SERVICE)));
            logger.begin(perfTimerName(context), logContext);
        } else {
            // start performance timer even when not logging payload
            logger.begin(perfTimerName(context), new HashMap<String, String>());
        }

        // keep request for handleFault and starting time
        context.put(KEY_REQUEST, context.getMessage());
        context.put(KEY_START_TIME, System.nanoTime());
View Full Code Here

Examples of oracle.adf.share.logging.ADFLogger

     * @param context the message context
     * @see #getServiceLogger
     */
    public void handleResponse(final SOAPMessageContext context) {
        // log normal response payload
        final ADFLogger logger = getServiceLogger(context);
        stopTimer(context, logger);
        if (logger.isLoggable(LOG_LEVEL)) {
            logger.log(LOG_LEVEL, "response payload\n{0}", prettyXml(context.getMessage()));
        }
    }
View Full Code Here

Examples of oracle.adf.share.logging.ADFLogger

     * return false.
     * @see #getServiceLogger
     */
    @Override
    public boolean handleFault(final SOAPMessageContext context) {
        final ADFLogger logger = getServiceLogger(context);
        stopTimer(context, logger);
        // always log at warning level for SOAP Faults
        if (logger.isLoggable(ADFLogger.WARNING)) {
            logger.log(ADFLogger.WARNING, "fault response payload\n{0}\n...caused by request\n{1}", new Object[] {
                       prettyXml(context.getMessage()), prettyXml((SOAPMessage) context.get(KEY_REQUEST))
            });
        }
        return true; // return true to continue processing
    }
View Full Code Here

Examples of oracle.adf.share.logging.ADFLogger

     */
    public ADFLogger getServiceLogger(final MessageContext context) {
        final String loggerName =
            "org.adfemg." + LoggingSoapHandler.class.getSimpleName() + "." + fullOperationName(context);
        internalLogger.log(LOG_LEVEL, "using logger {0}", loggerName);
        final ADFLogger logger = ADFLogger.createADFLogger(loggerName);
        return logger;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.