コード例 #1
0
  protected boolean createPerfLogContextForWSRequest(
      MessageContext context,
      SOAPMessage message,
      PerfLogContextTrackingData perfLogContextTrackingData) {

    logger.debug("handleRequest - createPerfLogContextForWSRequest");

    PerfLogContextHelper.startPerfLogTxnMonitor(perfLogContextTrackingData);

    // This context is deleted when handling the response in handleMessage() or
    // in handleFault() method
    // Note: there may be a chance that the context may not get deleted
    // However that is ok, because if a new context is created on the same
    // thread and if it finds a zombie context, it will be deleted next time around
    //

    PerfLogContextHelper.pushInfoContext(
        PerfLogContextConstants.CALLING_JVM_HOST_ID,
        perfLogContextTrackingData.getCallingJvmHostId());
    PerfLogContextHelper.pushInfoContext(
        PerfLogContextConstants.CALLING_JVM_CLONE_ID,
        perfLogContextTrackingData.getCallingJvmCloneId());
    String tmpValueStr;
    PerfLogContextHelper.pushInfoContext(
        ContextHandlerConstants.PROPERTY_NAME_JAXRPC_INBOUND_URL,
        (tmpValueStr =
            (String)
                context.getProperty(ContextHandlerConstants.PROPERTY_NAME_JAXRPC_INBOUND_URL)));
    PerfLogContextHelper.addToTxnList(tmpValueStr);
    PerfLogContextHelper.pushInfoContext(
        ContextHandlerConstants.PROPERTY_NAME_JAXRPC_SOAP_ACTION,
        (tmpValueStr =
            (String)
                context.getProperty(ContextHandlerConstants.PROPERTY_NAME_JAXRPC_SOAP_ACTION)));
    PerfLogContextHelper.addToTxnList(tmpValueStr);
    PerfLogContextHelper.setUserId(perfLogContextTrackingData.getUserId());
    PerfLogContextHelper.setRequestSessionId(
        perfLogContextTrackingData.getSessionId()); // calling JVM session id if set
    addMessagePropertiesToPerfLogContext(context);

    // add any current filter specific info here.. e.g. from the message
    // data.

    return true;
  }
コード例 #2
0
  @Override
  public boolean handleRequest(MessageContext context) {

    logger.debug("JaxRpcLogContextServerHandler.handleRequest()");

    String soapMessageString = getSOAPMessageString(context);

    SOAPMessageContext soapContext = (SOAPMessageContext) context;
    SOAPMessage message = soapContext.getMessage();

    PerfLogContextTrackingData perfLogContextTrackingData;

    perfLogContextTrackingData = retrieveLogContextFromSOAPHeader(context);

    // create a thread context
    logger.debug(
        "JaxRpcLogContextServerHandler: guid = "
            + perfLogContextTrackingData.getGuid()
            + " sessionId="
            + perfLogContextTrackingData.getSessionId()
            + " callingJVMHostId="
            + perfLogContextTrackingData.getCallingJvmHostId()
            + " callingJVMCloneId="
            + perfLogContextTrackingData.getCallingJvmCloneId()
            + " callingJVMDepth="
            + perfLogContextTrackingData.getCallingJvmDepthStr()
            + " userId="
            + perfLogContextTrackingData.getUserId()
            + " createTime="
            + perfLogContextTrackingData.getCreateTimeInMillisStr());
    createPerfLogContextForWSRequest(context, message, perfLogContextTrackingData);
    if (LoggerProperties.getInstance().isPerfLogWSCacheSOAPMessage())
      addSOAPMessageStringToPerfLogContextRequestData("JaxRpcServerSOAPRequest", soapMessageString);

    // track elapsed time for this web service...
    context.setProperty(
        ContextHandlerConstants.PROPERTY_NAME_startTime, new Long(System.currentTimeMillis()));
    return super.handleRequest(context);
  }