You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by sa...@apache.org on 2006/01/03 20:16:42 UTC

svn commit: r365717 - /webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContext.java

Author: sanjiva
Date: Tue Jan  3 11:16:37 2006
New Revision: 365717

URL: http://svn.apache.org/viewcvs?rev=365717&view=rev
Log:
fixed up setProperty to work with options and updated getProperty
accordingly

Modified:
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContext.java

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContext.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContext.java?rev=365717&r1=365716&r2=365717&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContext.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContext.java Tue Jan  3 11:16:37 2006
@@ -475,6 +475,20 @@
     }
 
     /**
+     * Set a property for this message context.
+     * 
+     * @param name
+     *            name of the property
+     * @param value
+     *            the value to set
+     */
+    public void setProperty(String name, Object value) {
+        // we override this method here to make sure the properties are set on
+        // options rather than in the inherited property bag.
+        options.setProperty(name, value);
+    }
+
+    /**
      * Retrieves a property value. The order of search is as follows: search in
      * my own options and then look in my context hierarchy. Since its possible
      * that the entire hierarchy is not present, I will start at whatever level
@@ -485,14 +499,8 @@
      * @return the value of the property, or null if the property is not found
      */
     public Object getProperty(String name) {
-        // search in my own properties bag
-        Object obj = super.getProperty(name);
-        if (obj != null) {
-            return obj;
-        }
-
         // search in my own options
-        obj = options.getProperty(name);
+        Object obj = options.getProperty(name);
         if (obj != null) {
             return obj;
         }
@@ -512,7 +520,7 @@
             return configurationContext.getProperty(name);
         }
 
-        // oops
+        // tough
         return null;
     }