Author: azeez
Date: Wed Jan 16 03:00:22 2008
New Revision: 12342

Log:

CHanges from trunk



Modified:
   
branches/wsas/java/2.2/commons/tracer/src/main/java/org/wso2/tracer/TracerConstants.java
   
branches/wsas/java/2.2/commons/tracer/src/main/java/org/wso2/tracer/TracerUtils.java
   
branches/wsas/java/2.2/commons/tracer/src/main/java/org/wso2/tracer/module/TraceMessage.java
   
branches/wsas/java/2.2/commons/tracer/src/main/java/org/wso2/tracer/service/TracerService.java
   
branches/wsas/java/2.2/commons/tracer/src/main/java/org/wso2/tracer/service/TracerServiceInfo.java

Modified: 
branches/wsas/java/2.2/commons/tracer/src/main/java/org/wso2/tracer/TracerConstants.java
==============================================================================
--- 
branches/wsas/java/2.2/commons/tracer/src/main/java/org/wso2/tracer/TracerConstants.java
    (original)
+++ 
branches/wsas/java/2.2/commons/tracer/src/main/java/org/wso2/tracer/TracerConstants.java
    Wed Jan 16 03:00:22 2008
@@ -21,7 +21,7 @@
 public final class TracerConstants {
 
     public static final String MSG_SEQ_BUFFER = "wso2tracer.msg.seq.buff";
-    public static final int MSG_BUFFER_SZ = 50;
+    public static final int MSG_BUFFER_SZ = 250;
     public static final String TRACING_STATUS = "wso2tracer.status";
 
     public static final String TRACE_PERSISTER_IMPL = 
"wso2tracer.trace.persister.impl";

Modified: 
branches/wsas/java/2.2/commons/tracer/src/main/java/org/wso2/tracer/TracerUtils.java
==============================================================================
--- 
branches/wsas/java/2.2/commons/tracer/src/main/java/org/wso2/tracer/TracerUtils.java
        (original)
+++ 
branches/wsas/java/2.2/commons/tracer/src/main/java/org/wso2/tracer/TracerUtils.java
        Wed Jan 16 03:00:22 2008
@@ -1,17 +1,17 @@
-/*
- * Copyright 2004,2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+/*                                                                             
+ * Copyright 2004,2005 The Apache Software Foundation.                         
+ *                                                                             
+ * Licensed under the Apache License, Version 2.0 (the "License");             
+ * you may not use this file except in compliance with the License.            
+ * You may obtain a copy of the License at                                     
+ *                                                                             
+ *      http://www.apache.org/licenses/LICENSE-2.0                             
+ *                                                                             
+ * Unless required by applicable law or agreed to in writing, software         
+ * distributed under the License is distributed on an "AS IS" BASIS,           
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    
+ * See the License for the specific language governing permissions and         
+ * limitations under the License.                                              
  */
 package org.wso2.tracer;
 
@@ -42,5 +42,5 @@
         XMLPrettyPrinter xmlPrettyPrinter = new XMLPrettyPrinter(xmlIn, 
encoding);
         return xmlPrettyPrinter.xmlFormat();
     }
-
-}
\ No newline at end of file
+    
+}

Modified: 
branches/wsas/java/2.2/commons/tracer/src/main/java/org/wso2/tracer/module/TraceMessage.java
==============================================================================
--- 
branches/wsas/java/2.2/commons/tracer/src/main/java/org/wso2/tracer/module/TraceMessage.java
        (original)
+++ 
branches/wsas/java/2.2/commons/tracer/src/main/java/org/wso2/tracer/module/TraceMessage.java
        Wed Jan 16 03:00:22 2008
@@ -1,17 +1,17 @@
-/*
- * Copyright 2004,2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+/*                                                                             
+ * Copyright 2004,2005 The Apache Software Foundation.                         
+ *                                                                             
+ * Licensed under the Apache License, Version 2.0 (the "License");             
+ * you may not use this file except in compliance with the License.            
+ * You may obtain a copy of the License at                                     
+ *                                                                             
+ *      http://www.apache.org/licenses/LICENSE-2.0                             
+ *                                                                             
+ * Unless required by applicable law or agreed to in writing, software         
+ * distributed under the License is distributed on an "AS IS" BASIS,           
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    
+ * See the License for the specific language governing permissions and         
+ * limitations under the License.                                              
  */
 package org.wso2.tracer.module;
 
@@ -61,4 +61,4 @@
     public long getTimestamp() {
         return timestamp;
     }
-}
\ No newline at end of file
+}

Modified: 
branches/wsas/java/2.2/commons/tracer/src/main/java/org/wso2/tracer/service/TracerService.java
==============================================================================
--- 
branches/wsas/java/2.2/commons/tracer/src/main/java/org/wso2/tracer/service/TracerService.java
      (original)
+++ 
branches/wsas/java/2.2/commons/tracer/src/main/java/org/wso2/tracer/service/TracerService.java
      Wed Jan 16 03:00:22 2008
@@ -29,6 +29,7 @@
 import org.wso2.utils.CircularBuffer;
 
 import java.util.ArrayList;
+import java.util.Collections;
 /*
  * 
  */
@@ -55,6 +56,7 @@
                 MessageContext.getCurrentMessageContext()
                         .getParameter(TracerConstants.TRACE_PERSISTER_IMPL);
         TracePersister tracePersister = getTracePersister(tracePersisterParam);
+        
tracerServiceInfo.setTracePersister(tracePersister.getClass().getName());
         if (tracePersister.isTracingEnabled()) {
             if (!axisConfiguration.isEngaged(axisModule)) {
                 axisConfiguration.engageModule(axisModule);
@@ -77,7 +79,7 @@
                 return tracerServiceInfo;
 
             } else {
-                ArrayList messageInfoList = new ArrayList();
+                ArrayList msgInfoList = new ArrayList();
                 boolean filterStatus = (filter != null && filter.length() != 
0);
                 tracerServiceInfo.setFilter(filterStatus);
 
@@ -88,43 +90,40 @@
                                                               
mi.getOperationName(),
                                                               
mi.getMessageSequence());
                         if (miPayload.getRequest().indexOf(filter) > -1) {
-                            messageInfoList.add(mi);
+                            msgInfoList.add(mi);
                         }
                         continue;
                     }
-                    messageInfoList.add(mi);
+                    msgInfoList.add(mi);
                 }
 
                 if (filterStatus) {
                     tracerServiceInfo.setFilterString(filter);
-                    if (messageInfoList.size() == 0) {
+                    if (msgInfoList.size() == 0) {
                         tracerServiceInfo.setEmpty(true);
                         return tracerServiceInfo;
                     }
                 }
 
-                MessageInfo lastMessageInfo = (MessageInfo) 
messageInfoList.get(0);
+                Collections.reverse(msgInfoList);
+                MessageInfo lastMessageInfo = (MessageInfo) msgInfoList.get(0);
                 tracerServiceInfo.setMessageInfo(
-                        (MessageInfo[]) messageInfoList.toArray(new 
MessageInfo[messageInfoList.size()]));
-                MessagePayload messagePayload = 
getMessage(lastMessageInfo.getServiceId(),
-                                                           
lastMessageInfo.getOperationName(),
-                                                           
lastMessageInfo.getMessageSequence());
-                tracerServiceInfo.setLastMessage(messagePayload);
+                        (MessageInfo[]) msgInfoList.toArray(new 
MessageInfo[msgInfoList.size()]));
+                MessagePayload lastMsg = 
getMessage(lastMessageInfo.getServiceId(),
+                                                    
lastMessageInfo.getOperationName(),
+                                                    
lastMessageInfo.getMessageSequence());
+                tracerServiceInfo.setLastMessage(lastMsg);
                 tracerServiceInfo.setEmpty(false);
-
             }
-
-
         }
-
-
         return tracerServiceInfo;
-
     }
 
     /**
      * @param flag; support ON or OFF.
+     *
      * @return The information about the Tracer service
+     *
      * @throws AxisFault If the tracer module is not found
      */
     public TracerServiceInfo setMonitoring(String flag) throws AxisFault {

Modified: 
branches/wsas/java/2.2/commons/tracer/src/main/java/org/wso2/tracer/service/TracerServiceInfo.java
==============================================================================
--- 
branches/wsas/java/2.2/commons/tracer/src/main/java/org/wso2/tracer/service/TracerServiceInfo.java
  (original)
+++ 
branches/wsas/java/2.2/commons/tracer/src/main/java/org/wso2/tracer/service/TracerServiceInfo.java
  Wed Jan 16 03:00:22 2008
@@ -25,6 +25,7 @@
     private boolean empty;
     private boolean filter;
     private String filterString;
+    private String tracePersister;
 
     public String getFlag() {
         return flag;
@@ -73,4 +74,13 @@
     public void setFilterString(String filterString) {
         this.filterString = filterString;
     }
+
+
+    public String getTracePersister() {
+        return tracePersister;
+    }
+
+    public void setTracePersister(String tracePersister) {
+        this.tracePersister = tracePersister;
+    }
 }

_______________________________________________
Wsas-java-dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/wsas-java-dev

Reply via email to