axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n...@apache.org
Subject svn commit: r499212 - in /webservices/axis2/trunk/java/modules: addressing/src/org/apache/axis2/handlers/addressing/ jaxws/src/org/apache/axis2/jaxws/client/async/ jaxws/src/org/apache/axis2/jaxws/core/controller/ kernel/src/org/apache/axis2/addressing...
Date Wed, 24 Jan 2007 02:31:18 GMT
Author: nagy
Date: Tue Jan 23 18:31:16 2007
New Revision: 499212

URL: http://svn.apache.org/viewvc?view=rev&rev=499212
Log:
Added a log correlation field to the MessageContext so that it is easier to match related
entries within a log file.  Using the field (accessible through the getLogCorrelationID(),
getLogIDString(), or toString() methods) should provide increased log readability irrespective
of thread switches or message persistence/restart.  I'm sure that I didn't catch all of the
log entries that should make use of the id.

Modified:
    webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingFinalInHandler.java
    webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/async/AsyncUtils.java
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/core/controller/AxisInvocationController.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/AddressingHelper.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/MessageContext.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisOperation.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dispatchers/AbstractOperationDispatcher.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dispatchers/AbstractServiceDispatcher.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dispatchers/ActionBasedOperationDispatcher.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dispatchers/RelatesToBasedOperationDispatcher.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dispatchers/RelatesToBasedServiceDispatcher.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dispatchers/RequestURIBasedOperationDispatcher.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dispatchers/RequestURIBasedServiceDispatcher.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dispatchers/SOAPMessageBodyBasedOperationDispatcher.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dispatchers/SOAPMessageBodyBasedServiceDispatcher.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AbstractDispatcher.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AddressingBasedDispatcher.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AxisEngine.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/Phase.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/RequestURIBasedDispatcher.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/RequestURIOperationDispatcher.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/SOAPActionBasedDispatcher.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/SOAPMessageBodyBasedDispatcher.java
    webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/engine/MessageContextChangeTest.java

Modified: webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingFinalInHandler.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingFinalInHandler.java?view=diff&rev=499212&r1=499211&r2=499212
==============================================================================
--- webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingFinalInHandler.java
(original)
+++ webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingFinalInHandler.java
Tue Jan 23 18:31:16 2007
@@ -86,7 +86,7 @@
             }
             
             if (log.isTraceEnabled()){
-                log.trace("setDefaults: Setting WS-Addressing default value for the ReplyTo
property.");
+                log.trace(messageContext.getLogIDString()+" setDefaults: Setting WS-Addressing
default value for the ReplyTo property.");
             }
             
             epr.setAddress(Final.WSA_ANONYMOUS_URL);

Modified: webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java?view=diff&rev=499212&r1=499211&r2=499212
==============================================================================
--- webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java
(original)
+++ webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java
Tue Jan 23 18:31:16 2007
@@ -75,7 +75,7 @@
         // it should be able to disable addressing by some one.
         Object property = msgContext.getProperty(DISABLE_ADDRESSING_FOR_OUT_MESSAGES);
         if (JavaUtils.isTrueExplicitly(property)) {
-            log.debug("Addressing is disabled .....");
+            log.debug(msgContext.getLogIDString()+" Addressing is disabled .....");
             return InvocationResponse.CONTINUE;
         }
 
@@ -176,13 +176,13 @@
         String action = messageContextOptions.getAction();
         
         if(log.isTraceEnabled()){
-            log.trace("processWSAAction: action from messageContext: "+action);
+            log.trace(msgCtxt.getLogIDString()+" processWSAAction: action from messageContext:
"+action);
         }
         if(action == null || "".equals(action)){
             if(msgCtxt.getAxisOperation()!=null){
                 action = msgCtxt.getAxisOperation().getOutputAction();
                 if(log.isTraceEnabled()){
-                    log.trace("processWSAAction: action from AxisOperation: "+action);
+                    log.trace(msgCtxt.getLogIDString()+" processWSAAction: action from AxisOperation:
"+action);
                 }
             }
         }
@@ -201,12 +201,12 @@
         if(!isAddressingHeaderAlreadyAvailable(WSA_ACTION, envelope,
                 addressingNamespaceObject, replaceHeaders, false)){
             if(log.isTraceEnabled()){
-                log.trace("processWSAAction: No existing wsa:Action header found");
+                log.trace(msgCtxt.getLogIDString()+" processWSAAction: No existing wsa:Action
header found");
             }
             // If we don't have an action to add,
             if(action == null || "".equals(action)){
                 if(log.isTraceEnabled()){
-                    log.trace("processWSAAction: No action to add to header");
+                    log.trace(msgCtxt.getLogIDString()+" processWSAAction: No action to add
to header");
                 }
                 // Fault unless validation has been explictily turned off
                 if(!Utils.isExplicitlyTrue(msgCtxt, AddressingConstants.DISABLE_OUTBOUND_ADDRESSING_VALIDATION)){
@@ -214,7 +214,7 @@
                 }
             }else{
                 if(log.isTraceEnabled()){
-                    log.trace("processWSAAction: Adding action to header: "+action);
+                    log.trace(msgCtxt.getLogIDString()+" processWSAAction: Adding action
to header: "+action);
                 }
                 // Otherwise just add the header
                 OMElement oe = processStringInfo(action, WSA_ACTION, envelope, addressingNamespaceObject);

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/async/AsyncUtils.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/async/AsyncUtils.java?view=diff&rev=499212&r1=499211&r2=499212
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/async/AsyncUtils.java
(original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/client/async/AsyncUtils.java
Tue Jan 23 18:31:16 2007
@@ -51,7 +51,7 @@
         }
         catch (Throwable t) {
             if (debug) {
-                log.debug("An error occurred in the ThreadContextMigratorUtil " + t);
+                log.debug(axisResponse.getLogIDString()+" An error occurred in the ThreadContextMigratorUtil
" + t);
                 log.debug("...caused by " + t.getCause());
             }
             throw ExceptionFactory.makeWebServiceException(t);

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/core/controller/AxisInvocationController.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/core/controller/AxisInvocationController.java?view=diff&rev=499212&r1=499211&r2=499212
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/core/controller/AxisInvocationController.java
(original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/core/controller/AxisInvocationController.java
Tue Jan 23 18:31:16 2007
@@ -121,7 +121,7 @@
             // there would be no message on the MessageContext
             faultexception = af;
             if (log.isDebugEnabled()) {
-                log.debug("AxisFault received from client: " + af.getMessage());
+                log.debug(axisRequestMsgCtx.getLogIDString()+" AxisFault received from client:
" + af.getMessage());
             }
         }
         
@@ -192,7 +192,7 @@
             // Whatever exception we get here will not be from the server since a one-way
             // invocation has no response.  This will always be a SENDER fault
             if (log.isDebugEnabled()) {
-                log.debug("AxisFault received from client: " + af.getMessage());
+                log.debug(axisRequestMsgCtx.getLogIDString()+" AxisFault received from client:
" + af.getMessage());
             }
         	throw ExceptionFactory.makeWebServiceException(ClassUtils.getRootCause(af));
         }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/AddressingHelper.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/AddressingHelper.java?view=diff&rev=499212&r1=499211&r2=499212
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/AddressingHelper.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/AddressingHelper.java
Tue Jan 23 18:31:16 2007
@@ -44,7 +44,7 @@
         EndpointReference replyTo = messageContext.getReplyTo();
         if (replyTo == null) {
             if (isDebugEnabled) {
-                log.debug("isReplyRedirected: ReplyTo is null. Returning false");
+                log.debug(messageContext.getLogIDString()+" isReplyRedirected: ReplyTo is
null. Returning false");
             }
             return false;
         } else {
@@ -64,7 +64,7 @@
         EndpointReference faultTo = messageContext.getFaultTo();
         if (faultTo == null) {
             if (isDebugEnabled) {
-                log.debug("isReplyRedirected: FaultTo is null. Returning isReplyRedirected");
+                log.debug(messageContext.getLogIDString()+" isReplyRedirected: FaultTo is
null. Returning isReplyRedirected");
             }
             return isReplyRedirected(messageContext);
         } else {

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/MessageContext.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/MessageContext.java?view=diff&rev=499212&r1=499211&r2=499212
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/MessageContext.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/MessageContext.java
Tue Jan 23 18:31:16 2007
@@ -89,6 +89,19 @@
      */
     private static final Log log = LogFactory.getLog(MessageContext.class);
 
+    /**
+     * @serial An ID which can be used to correlate operations on a single
+     * message in the log files, irrespective of thread switches, persistence,
+     * etc. 
+     */
+    private String logCorrelationID = UUIDGenerator.getUUID();
+    
+    /**
+     * This string will be used to hold a form of the logCorrelationID that
+     * is more suitable for output than its generic form.
+     */
+    private transient String logCorrelationIDString = "[MessageContext: logID="+logCorrelationID+"]";
+    
     private static final String myClassName = "MessageContext";
 
     /**
@@ -517,6 +530,37 @@
         options = new Options();
     }
 
+    public String toString()
+    {
+      return logCorrelationIDString;
+    }
+    
+    /**
+     * Get a "raw" version of the logCorrelationID.  The logCorrelationID
+     * is guaranteed to be unique and may be persisted along with the rest
+     * of the message context.
+     * 
+     * @return A string that can be output to a log file as an identifier
+     * for this MessageContext.  It is suitable for matching related log
+     * entries. 
+     */
+    public String getLogCorrelationID()
+    {
+      return logCorrelationID;
+    }
+    
+    /**
+     * Get a formatted version of the logCorrelationID.
+     * 
+     * @return A string that can be output to a log file as an identifier
+     * for this MessageContext.  It is suitable for matching related log
+     * entries. 
+     */
+    public String getLogIDString()
+    {
+      return logCorrelationIDString;
+    }
+
     /**
      * Pause the execution of the current handler chain
      */
@@ -2223,6 +2267,8 @@
 
         out.writeLong(getLastTouchedTime());
 
+        ObjectStateUtils.writeString(out, logCorrelationID, "logCorrelationID");
+
         boolean persistWithOptimizedMTOM = (getProperty(MTOMConstants.ATTACHMENTS) != null);
         out.writeBoolean(persistWithOptimizedMTOM);
         
@@ -3176,6 +3222,9 @@
         long time = in.readLong();
         setLastTouchedTime(time);
 
+        logCorrelationID = ObjectStateUtils.readString(in, "logCorrelationID");
+        logCorrelationIDString = "[MessageContext: logID="+logCorrelationID+"]";
+        
         boolean persistedWithOptimizedMTOM = in.readBoolean();
         
         String contentType = null;
@@ -4954,4 +5003,5 @@
     {
         this.options = op;
     }
+    
 }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisOperation.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisOperation.java?view=diff&rev=499212&r1=499211&r2=499212
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisOperation.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisOperation.java
Tue Jan 23 18:31:16 2007
@@ -324,7 +324,7 @@
                     configContext.getOperationContext(msgContext.getRelatesTo().getValue());
 
             if (null == operationContext && log.isDebugEnabled()) {
-                log.debug("Cannot correlate inbound message RelatesTo value [" + msgContext.getRelatesTo()
+ "] to in-progree MEP");
+                log.debug(msgContext.getLogIDString()+" Cannot correlate inbound message
RelatesTo value [" + msgContext.getRelatesTo() + "] to in-progree MEP");
             }
         }
 

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dispatchers/AbstractOperationDispatcher.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dispatchers/AbstractOperationDispatcher.java?view=diff&rev=499212&r1=499211&r2=499212
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dispatchers/AbstractOperationDispatcher.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dispatchers/AbstractOperationDispatcher.java
Tue Jan 23 18:31:16 2007
@@ -58,7 +58,7 @@
 
             if (axisOperation != null) {
                 if (isDebugEnabled) {
-                    log.debug(Messages.getMessage("operationfound",
+                    log.debug(msgctx.getLogIDString()+" "+Messages.getMessage("operationfound",
                             axisOperation.getName().getLocalPart()));
                 }
 

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dispatchers/AbstractServiceDispatcher.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dispatchers/AbstractServiceDispatcher.java?view=diff&rev=499212&r1=499211&r2=499212
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dispatchers/AbstractServiceDispatcher.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dispatchers/AbstractServiceDispatcher.java
Tue Jan 23 18:31:16 2007
@@ -56,7 +56,7 @@
 
             if (axisService != null) {
                 if (isDebugEnabled) {
-                    log.debug(Messages.getMessage("servicefound",
+                    log.debug(msgctx.getLogIDString()+" "+Messages.getMessage("servicefound",
                             axisService.getName()));
                 }
                 msgctx.setAxisService(axisService);

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dispatchers/ActionBasedOperationDispatcher.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dispatchers/ActionBasedOperationDispatcher.java?view=diff&rev=499212&r1=499211&r2=499212
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dispatchers/ActionBasedOperationDispatcher.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dispatchers/ActionBasedOperationDispatcher.java
Tue Jan 23 18:31:16 2007
@@ -33,7 +33,7 @@
         String action = messageContext.getSoapAction();
 
         if(isDebugEnabled){
-        log.debug("Checking for Operation using Action : " + action);
+        log.debug(messageContext.getLogIDString()+" Checking for Operation using Action :
" + action);
         }
         if (action != null) {
             AxisOperation op = service.getOperationBySOAPAction(action);

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dispatchers/RelatesToBasedOperationDispatcher.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dispatchers/RelatesToBasedOperationDispatcher.java?view=diff&rev=499212&r1=499211&r2=499212
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dispatchers/RelatesToBasedOperationDispatcher.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dispatchers/RelatesToBasedOperationDispatcher.java
Tue Jan 23 18:31:16 2007
@@ -34,14 +34,14 @@
     public AxisOperation findOperation(AxisService service, MessageContext messageContext)
throws AxisFault {
         RelatesTo relatesTo = messageContext.getRelatesTo();
         if(isDebugEnabled){
-            log.debug("Checking for OperationContext using RelatesTo : " + relatesTo);
+            log.debug(messageContext.getLogIDString()+" Checking for OperationContext using
RelatesTo : " + relatesTo);
         }
         if((relatesTo!=null) && (relatesTo.getValue()!=null)){
             ConfigurationContext configurationContext = messageContext.getConfigurationContext();
             OperationContext operationContext = configurationContext.getOperationContext(relatesTo.getValue());
             if(operationContext != null){
                 if(isDebugEnabled){
-                    log.debug("Found OperationContext: " + operationContext);
+                    log.debug(messageContext.getLogIDString()+" Found OperationContext: "
+ operationContext);
                 }
                 return operationContext.getAxisOperation();
             }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dispatchers/RelatesToBasedServiceDispatcher.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dispatchers/RelatesToBasedServiceDispatcher.java?view=diff&rev=499212&r1=499211&r2=499212
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dispatchers/RelatesToBasedServiceDispatcher.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dispatchers/RelatesToBasedServiceDispatcher.java
Tue Jan 23 18:31:16 2007
@@ -33,14 +33,14 @@
     public AxisService findService(MessageContext messageContext) throws AxisFault {
         RelatesTo relatesTo = messageContext.getRelatesTo();
         if(isDebugEnabled){
-            log.debug("Checking for OperationContext using RelatesTo : " + relatesTo);
+            log.debug(messageContext.getLogIDString()+" Checking for OperationContext using
RelatesTo : " + relatesTo);
         }
         if((relatesTo!=null) && (relatesTo.getValue()!=null)){
             ConfigurationContext configurationContext = messageContext.getConfigurationContext();
             OperationContext operationContext = configurationContext.getOperationContext(relatesTo.getValue());
             if(operationContext != null){
                 if(isDebugEnabled){
-                    log.debug("Found OperationContext: " + operationContext);
+                    log.debug(messageContext.getLogIDString()+" Found OperationContext: "
+ operationContext);
                 }
                 return operationContext.getServiceContext().getAxisService();
             }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dispatchers/RequestURIBasedOperationDispatcher.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dispatchers/RequestURIBasedOperationDispatcher.java?view=diff&rev=499212&r1=499211&r2=499212
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dispatchers/RequestURIBasedOperationDispatcher.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dispatchers/RequestURIBasedOperationDispatcher.java
Tue Jan 23 18:31:16 2007
@@ -50,14 +50,14 @@
 
             if ((values.length >= 2) && (values[1] != null)) {
                 QName operationName = new QName(values[1]);
-                log.debug("Checking for Operation using QName(target endpoint URI fragment)
: " + operationName);
+                log.debug(messageContext.getLogIDString()+" Checking for Operation using
QName(target endpoint URI fragment) : " + operationName);
                 return service.getOperation(operationName);
             } else {
-                log.debug("Attempted to check for Operation using target endpoint URI, but
the operation fragment was missing");
+                log.debug(messageContext.getLogIDString()+" Attempted to check for Operation
using target endpoint URI, but the operation fragment was missing");
                 return null;
             }
         } else {
-            log.debug("Attempted to check for Operation using null target endpoint URI");
+            log.debug(messageContext.getLogIDString()+" Attempted to check for Operation
using null target endpoint URI");
             return null;
         }
     }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dispatchers/RequestURIBasedServiceDispatcher.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dispatchers/RequestURIBasedServiceDispatcher.java?view=diff&rev=499212&r1=499211&r2=499212
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dispatchers/RequestURIBasedServiceDispatcher.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dispatchers/RequestURIBasedServiceDispatcher.java
Tue Jan 23 18:31:16 2007
@@ -39,7 +39,7 @@
 
         if (toEPR != null) {
             if(isDebugEnabled){
-                log.debug("Checking for Service using target endpoint address : " + toEPR.getAddress());
+                log.debug(messageContext.getLogIDString()+" Checking for Service using target
endpoint address : " + toEPR.getAddress());
             }
             String filePart = toEPR.getAddress();
             //REVIEW: (nagy) Parsing the RequestURI will also give us the operationName if
present, so we could conceivably store it in the MessageContext, but doing so and retrieving
it is probably no faster than simply reparsing the URI
@@ -53,13 +53,13 @@
                 return registry.getService(values[0]);
             } else {
                 if(isDebugEnabled){
-                    log.debug("Attempted to check for Service using target endpoint URI,
but the service fragment was missing");
+                    log.debug(messageContext.getLogIDString()+" Attempted to check for Service
using target endpoint URI, but the service fragment was missing");
                 }
                 return null;
             }
         } else {
             if(isDebugEnabled){
-                log.debug("Attempted to check for Service using null target endpoint URI");
+                log.debug(messageContext.getLogIDString()+" Attempted to check for Service
using null target endpoint URI");
             }
             return null;
         }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dispatchers/SOAPMessageBodyBasedOperationDispatcher.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dispatchers/SOAPMessageBodyBasedOperationDispatcher.java?view=diff&rev=499212&r1=499211&r2=499212
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dispatchers/SOAPMessageBodyBasedOperationDispatcher.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dispatchers/SOAPMessageBodyBasedOperationDispatcher.java
Tue Jan 23 18:31:16 2007
@@ -39,8 +39,8 @@
             return null;
         } else {
             if(isDebugEnabled){
-            log.debug(
-                    "Checking for Operation using SOAP message body's first child's local
name : "
+            log.debug(messageContext.getLogIDString()+
+                    " Checking for Operation using SOAP message body's first child's local
name : "
                             + bodyFirstChild.getLocalName());
             }
             operationName = new QName(bodyFirstChild.getLocalName());

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dispatchers/SOAPMessageBodyBasedServiceDispatcher.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dispatchers/SOAPMessageBodyBasedServiceDispatcher.java?view=diff&rev=499212&r1=499211&r2=499212
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dispatchers/SOAPMessageBodyBasedServiceDispatcher.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dispatchers/SOAPMessageBodyBasedServiceDispatcher.java
Tue Jan 23 18:31:16 2007
@@ -42,7 +42,7 @@
                 String filePart = ns.getNamespaceURI();
 
                 if(isDebugEnabled){
-                log.debug(
+                log.debug(messageContext.getLogIDString()+
                         "Checking for Service using SOAP message body's first child's namespace
: "
                                 + filePart);
                 }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AbstractDispatcher.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AbstractDispatcher.java?view=diff&rev=499212&r1=499211&r2=499212
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AbstractDispatcher.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AbstractDispatcher.java
Tue Jan 23 18:31:16 2007
@@ -82,7 +82,7 @@
 
             if (axisService != null) {
                 if (isDebugEnabled) {
-                    log.debug(Messages.getMessage("servicefound",
+                    log.debug(msgctx.getLogIDString()+" "+Messages.getMessage("servicefound",
                             axisService.getName()));
                 }
                 msgctx.setAxisService(axisService);
@@ -94,7 +94,7 @@
 
             if (axisOperation != null) {
                 if (isDebugEnabled) {
-                    log.debug(Messages.getMessage("operationfound",
+                    log.debug(msgctx.getLogIDString()+" "+Messages.getMessage("operationfound",
                             axisOperation.getName().getLocalPart()));
                 }
 

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AddressingBasedDispatcher.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AddressingBasedDispatcher.java?view=diff&rev=499212&r1=499211&r2=499212
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AddressingBasedDispatcher.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AddressingBasedDispatcher.java
Tue Jan 23 18:31:16 2007
@@ -47,7 +47,7 @@
     public AxisOperation findOperation(AxisService service, MessageContext messageContext)
             throws AxisFault {
         if(isDebugEnabled){
-        log.debug(Messages.getMessage("checkingoperation",
+        log.debug(messageContext.getLogIDString()+" "+Messages.getMessage("checkingoperation",
                 messageContext.getWSAAction()));
         }
         String action = messageContext.getWSAAction();
@@ -70,7 +70,7 @@
             
             String address = toEPR.getAddress();
             if(isDebugEnabled){
-            log.debug(Messages.getMessage("checkingserviceforepr", address));
+            log.debug(messageContext.getLogIDString()+" "+Messages.getMessage("checkingserviceforepr",
address));
             }
             QName serviceName;
             ConfigurationContext configurationContext = messageContext.getConfigurationContext();
@@ -81,7 +81,7 @@
             }
 
             if(isDebugEnabled){
-            log.debug(Messages.getMessage("checkingserviceforepr", values[0]));
+            log.debug(messageContext.getLogIDString()+" "+Messages.getMessage("checkingserviceforepr",
values[0]));
             }
             if (values[0] != null) {
                 serviceName = new QName(values[0]);
@@ -111,7 +111,7 @@
             String relatesTo = msgctx.getRelatesTo().getValue();
 
             if(isDebugEnabled){
-            log.debug(Messages.getMessage("checkingrelatesto",
+            log.debug(msgctx.getLogIDString()+" "+Messages.getMessage("checkingrelatesto",
                     relatesTo));
             }
             if ((relatesTo != null) || "".equals(relatesTo)) {

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AxisEngine.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AxisEngine.java?view=diff&rev=499212&r1=499211&r2=499212
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AxisEngine.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AxisEngine.java
Tue Jan 23 18:31:16 2007
@@ -148,7 +148,7 @@
      */
     public InvocationResponse receive(MessageContext msgContext) throws AxisFault {
         if(log.isTraceEnabled()){
-            log.trace("receive:"+msgContext.getMessageID());
+            log.trace(msgContext.getLogIDString()+" receive:"+msgContext.getMessageID());
         }
         activateMessageContext(msgContext);
         ConfigurationContext confContext = msgContext.getConfigurationContext();
@@ -192,7 +192,7 @@
           else
           {
             String errorMsg = "Unrecognized InvocationResponse encountered in AxisEngine.receive()";
-            log.error(errorMsg);
+            log.error(msgContext.getLogIDString()+" "+errorMsg);
             throw new AxisFault(errorMsg);
           }
         }
@@ -322,7 +322,7 @@
      */
     public InvocationResponse resumeReceive(MessageContext msgContext) throws AxisFault {
         if(log.isTraceEnabled()){
-            log.trace("resumeReceive:"+msgContext.getMessageID());
+            log.trace(msgContext.getLogIDString()+" resumeReceive:"+msgContext.getMessageID());
         }
         activateMessageContext(msgContext);
 
@@ -367,7 +367,7 @@
      */
     public InvocationResponse resumeSend(MessageContext msgContext) throws AxisFault {
         if(log.isTraceEnabled()){
-            log.trace("resumeSend:"+msgContext.getMessageID());
+            log.trace(msgContext.getLogIDString()+" resumeSend:"+msgContext.getMessageID());
         }
         activateMessageContext(msgContext);
 
@@ -402,7 +402,7 @@
     public InvocationResponse receiveFault(MessageContext msgContext) throws AxisFault {
 
         activateMessageContext(msgContext);
-    	log.debug(Messages.getMessage("receivederrormessage",
+    	log.debug(msgContext.getLogIDString()+" "+Messages.getMessage("receivederrormessage",
                 msgContext.getMessageID()));
         ConfigurationContext confContext = msgContext.getConfigurationContext();
         ArrayList preCalculatedPhases =
@@ -442,7 +442,7 @@
           else
           {
             String errorMsg = "Unrecognized InvocationResponse encountered in AxisEngine.receiveFault()";
-            log.error(errorMsg);
+            log.error(msgContext.getLogIDString()+" "+errorMsg);
             throw new AxisFault(errorMsg);
           }
         }
@@ -464,7 +464,7 @@
      */
     public InvocationResponse resume(MessageContext msgctx) throws AxisFault {
         if(log.isTraceEnabled()){
-            log.trace("resume:"+msgctx.getMessageID());
+            log.trace(msgctx.getLogIDString()+" resume:"+msgctx.getMessageID());
         }
         activateMessageContext(msgctx);
 
@@ -489,7 +489,7 @@
      */
     public void send(MessageContext msgContext) throws AxisFault {
         if(log.isTraceEnabled()){
-            log.trace("send:"+msgContext.getMessageID());
+            log.trace(msgContext.getLogIDString()+" send:"+msgContext.getMessageID());
         }
         activateMessageContext(msgContext);
         // find and invoke the Phases
@@ -540,7 +540,7 @@
           else
           {
             String errorMsg = "Unrecognized InvocationResponse encountered in AxisEngine.send()";
-            log.error(errorMsg);
+            log.error(msgContext.getLogIDString()+" "+errorMsg);
             throw new AxisFault(errorMsg);
           }
         }
@@ -559,7 +559,7 @@
      */
     public void sendFault(MessageContext msgContext) throws AxisFault {
         if(log.isTraceEnabled()){
-            log.trace("sendFault:"+msgContext.getMessageID());
+            log.trace(msgContext.getLogIDString()+" sendFault:"+msgContext.getMessageID());
         }
         activateMessageContext(msgContext);
         OperationContext opContext = msgContext.getOperationContext();
@@ -583,7 +583,7 @@
               
               if (pi.equals(InvocationResponse.SUSPEND))
               {
-                log.warn("The resumption of this flow may function incorrectly, as the OutFaultFlow
will not be used");
+                log.warn(msgContext.getLogIDString()+" The resumption of this flow may function
incorrectly, as the OutFaultFlow will not be used");
                 return;
               }
               else if (pi.equals(InvocationResponse.ABORT))
@@ -594,7 +594,7 @@
               else if (!pi.equals(InvocationResponse.CONTINUE))
               {
                 String errorMsg = "Unrecognized InvocationResponse encountered in AxisEngine.sendFault()";
-                log.error(errorMsg);
+                log.error(msgContext.getLogIDString()+" "+errorMsg);
                 throw new AxisFault(errorMsg);
               }
             }
@@ -629,7 +629,7 @@
         else
         {
           String errorMsg = "Unrecognized InvocationResponse encountered in AxisEngine.sendFault()";
-          log.error(errorMsg);
+          log.error(msgContext.getLogIDString()+" "+errorMsg);
           throw new AxisFault(errorMsg);
         }
         
@@ -678,7 +678,7 @@
             try {
                 sender.invoke(msgctx);
             } catch (Exception e) {
-              log.info(e.getMessage());
+              log.info(msgctx.getLogIDString()+" "+e.getMessage());
               if (msgctx.getProperty(MessageContext.DISABLE_ASYNC_CALLBACK_ON_TRANSPORT_ERROR)
== null)
               {
                 AxisOperation axisOperation = msgctx.getAxisOperation();

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/Phase.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/Phase.java?view=diff&rev=499212&r1=499211&r2=499212
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/Phase.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/Phase.java Tue
Jan 23 18:31:16 2007
@@ -358,7 +358,7 @@
      */
     public final InvocationResponse invoke(MessageContext msgctx) throws AxisFault {
         if (isDebugEnabled) {
-            log.debug("Checking pre-condition for Phase \"" + phaseName + "\"");
+            log.debug(msgctx.getLogIDString()+" Checking pre-condition for Phase \"" + phaseName
+ "\"");
         }
         
         InvocationResponse pi = InvocationResponse.CONTINUE;
@@ -370,14 +370,14 @@
         }
 
         if (isDebugEnabled) {
-            log.debug("Invoking phase \"" + phaseName + "\"");
+            log.debug(msgctx.getLogIDString()+" Invoking phase \"" + phaseName + "\"");
         }
 
         while (currentIndex < handlers.size()) {
             Handler handler = (Handler) handlers.get(currentIndex);
 
             if (isDebugEnabled) {
-                log.debug("Invoking Handler '" + handler.getName() + "' in Phase '" + phaseName
+ "'");
+                log.debug(msgctx.getLogIDString()+" Invoking Handler '" + handler.getName()
+ "' in Phase '" + phaseName + "'");
             }
             pi = handler.invoke(msgctx);
 
@@ -391,7 +391,7 @@
         }
 
         if (isDebugEnabled) {
-            log.debug("Checking post-conditions for phase \"" + phaseName + "\"");
+            log.debug(msgctx.getLogIDString()+" Checking post-conditions for phase \"" +
phaseName + "\"");
         }
 
         msgctx.setCurrentPhaseIndex(0);
@@ -405,7 +405,7 @@
       
       if (isDebugEnabled)
       {
-        log.debug("Invoking flowComplete() in Phase \"" + phaseName + "\"");
+        log.debug(msgContext.getLogIDString()+" Invoking flowComplete() in Phase \"" + phaseName
+ "\"");
       }
       
       /*This will be non-zero if we failed during execution of one of the
@@ -428,7 +428,7 @@
         
         if (isDebugEnabled)
         {
-          log.debug("Invoking flowComplete() for Handler '" + handler.getName() + "' in Phase
'" + phaseName + "'");
+          log.debug(msgContext.getLogIDString()+" Invoking flowComplete() for Handler '"
+ handler.getName() + "' in Phase '" + phaseName + "'");
         }
         
         handler.flowComplete(msgContext);

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/RequestURIBasedDispatcher.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/RequestURIBasedDispatcher.java?view=diff&rev=499212&r1=499211&r2=499212
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/RequestURIBasedDispatcher.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/RequestURIBasedDispatcher.java
Tue Jan 23 18:31:16 2007
@@ -57,7 +57,7 @@
 
         if (toEPR != null) {
             if(isDebugEnabled){
-            log.debug("Checking for Service using target endpoint address : " + toEPR.getAddress());
+            log.debug(messageContext.getLogIDString()+" Checking for Service using target
endpoint address : " + toEPR.getAddress());
             }
             String filePart = toEPR.getAddress();
             //REVIEW: (nagy) Parsing the RequestURI will also give us the operationName if
present, so we could conceivably store it in the MessageContext, but doing so and retrieving
it is probably no faster than simply reparsing the URI
@@ -72,13 +72,13 @@
                 return registry.getService(values[0]);
             } else {
                 if(isDebugEnabled){
-                log.debug("Attempted to check for Service using target endpoint URI, but
the service fragment was missing");
+                log.debug(messageContext.getLogIDString()+" Attempted to check for Service
using target endpoint URI, but the service fragment was missing");
                 }
                 return null;
             }
         } else {
             if(isDebugEnabled){
-            log.debug("Attempted to check for Service using null target endpoint URI");
+            log.debug(messageContext.getLogIDString()+" Attempted to check for Service using
null target endpoint URI");
             }
             return null;
         }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/RequestURIOperationDispatcher.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/RequestURIOperationDispatcher.java?view=diff&rev=499212&r1=499211&r2=499212
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/RequestURIOperationDispatcher.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/RequestURIOperationDispatcher.java
Tue Jan 23 18:31:16 2007
@@ -52,14 +52,14 @@
 
             if ((values.length >= 2) && (values[1] != null)) {
                 QName operationName = new QName(values[1]);
-                log.debug("Checking for Operation using QName(target endpoint URI fragment)
: " + operationName);
+                log.debug(messageContext.getLogIDString()+" Checking for Operation using
QName(target endpoint URI fragment) : " + operationName);
                 return service.getOperation(operationName);
             } else {
-                log.debug("Attempted to check for Operation using target endpoint URI, but
the operation fragment was missing");
+                log.debug(messageContext.getLogIDString()+" Attempted to check for Operation
using target endpoint URI, but the operation fragment was missing");
                 return null;
             }
         } else {
-            log.debug("Attempted to check for Operation using null target endpoint URI");
+            log.debug(messageContext.getLogIDString()+" Attempted to check for Operation
using null target endpoint URI");
             return null;
         }
     }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/SOAPActionBasedDispatcher.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/SOAPActionBasedDispatcher.java?view=diff&rev=499212&r1=499211&r2=499212
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/SOAPActionBasedDispatcher.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/SOAPActionBasedDispatcher.java
Tue Jan 23 18:31:16 2007
@@ -44,7 +44,7 @@
         String action = messageContext.getSoapAction();
 
         if(isDebugEnabled){
-        log.debug("Checking for Operation using SOAPAction : " + action);
+        log.debug(messageContext.getLogIDString()+" Checking for Operation using SOAPAction
: " + action);
         }
         if (action != null) {
             AxisOperation op = service.getOperationBySOAPAction(action);
@@ -75,7 +75,7 @@
      */
     public AxisService findService(MessageContext messageContext) throws AxisFault {
         if(isDebugEnabled){
-        log.debug("Checking for Service using SOAPAction is a TODO item");
+        log.debug(messageContext.getLogIDString()+" Checking for Service using SOAPAction
is a TODO item");
         }
         return null;
     }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/SOAPMessageBodyBasedDispatcher.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/SOAPMessageBodyBasedDispatcher.java?view=diff&rev=499212&r1=499211&r2=499212
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/SOAPMessageBodyBasedDispatcher.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/SOAPMessageBodyBasedDispatcher.java
Tue Jan 23 18:31:16 2007
@@ -54,8 +54,8 @@
             return null;
         } else {
             if(isDebugEnabled){
-            log.debug(
-                    "Checking for Operation using SOAP message body's first child's local
name : "
+            log.debug(messageContext.getLogIDString()+
+                    " Checking for Operation using SOAP message body's first child's local
name : "
                             + bodyFirstChild.getLocalName());
             }
             operationName = new QName(bodyFirstChild.getLocalName());
@@ -85,8 +85,8 @@
                 String filePart = ns.getNamespaceURI();
 
                 if(isDebugEnabled){
-                log.debug(
-                        "Checking for Service using SOAP message body's first child's namespace
: "
+                log.debug(messageContext.getLogIDString()+
+                        " Checking for Service using SOAP message body's first child's namespace
: "
                                 + filePart);
                 }
                 ConfigurationContext configurationContext = messageContext.getConfigurationContext();

Modified: webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/engine/MessageContextChangeTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/engine/MessageContextChangeTest.java?view=diff&rev=499212&r1=499211&r2=499212
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/engine/MessageContextChangeTest.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/engine/MessageContextChangeTest.java
Tue Jan 23 18:31:16 2007
@@ -56,6 +56,8 @@
 
     private FieldDescription[] knownList = {
         new FieldDescription("org.apache.commons.logging.Log", "log"),
+        new FieldDescription("java.lang.String", "logCorrelationID"),
+        new FieldDescription("java.lang.String", "logCorrelationIDString"),
         new FieldDescription("java.lang.String", "myClassName"),
         new FieldDescription("long", "serialVersionUID"),
         new FieldDescription("int", "REVISION_1"),



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message