axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hemap...@apache.org
Subject svn commit: r168587 - in /webservices/axis/trunk/java/modules/core/src/org/apache/axis: context/ContextBuilder.java context/MessageContext.java context/SessionContext.java context/SimpleSessionContext.java description/AxisOperation.java receivers/AbstractMessageReceiver.java transport/http/AxisServlet.java
Date Fri, 06 May 2005 10:15:32 GMT
Author: hemapani
Date: Fri May  6 03:15:29 2005
New Revision: 168587

URL: http://svn.apache.org/viewcvs?rev=168587&view=rev
Log:
remove the SimpleSessionContext

Removed:
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/SimpleSessionContext.java
Modified:
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/ContextBuilder.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/MessageContext.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/SessionContext.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/AxisOperation.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/receivers/AbstractMessageReceiver.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/AxisServlet.java

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/ContextBuilder.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/ContextBuilder.java?rev=168587&r1=168586&r2=168587&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/ContextBuilder.java
(original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/ContextBuilder.java
Fri May  6 03:15:29 2005
@@ -1,21 +1,20 @@
 package org.apache.axis.context;
 
 import java.util.ArrayList;
-import java.util.HashMap;
 import java.util.Collection;
+import java.util.HashMap;
 import java.util.Iterator;
 
 import javax.xml.namespace.QName;
 
 import org.apache.axis.deployment.DeploymentEngine;
 import org.apache.axis.deployment.DeploymentException;
-import org.apache.axis.description.AxisService;
 import org.apache.axis.description.AxisModule;
 import org.apache.axis.description.AxisOperation;
+import org.apache.axis.description.AxisService;
 import org.apache.axis.engine.AxisFault;
 import org.apache.axis.engine.EngineConfiguration;
 import org.apache.axis.engine.EngineConfigurationImpl;
-import org.apache.axis.engine.ExecutionChain;
 import org.apache.axis.modules.Module;
 import org.apache.axis.phaseresolver.PhaseException;
 import org.apache.axis.phaseresolver.PhaseResolver;

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/MessageContext.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/MessageContext.java?rev=168587&r1=168586&r2=168587&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/MessageContext.java
(original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/MessageContext.java
Fri May  6 03:15:29 2005
@@ -141,7 +141,7 @@
         super(null);
 
         if (sessionContext == null) {
-            this.sessionContext = new SimpleSessionContext();
+            this.sessionContext = new SessionContext(null);
         } else {
             this.sessionContext = sessionContext;
         }

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/SessionContext.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/SessionContext.java?rev=168587&r1=168586&r2=168587&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/SessionContext.java
(original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/context/SessionContext.java
Fri May  6 03:15:29 2005
@@ -19,20 +19,12 @@
  * All the engine componets are stateless accross the executions and all the states should
be kept in the
  * Contexts, there are three context Global, Session and Message
  */
-public interface SessionContext {
+public class SessionContext extends AbstractContext {
     /**
-     * Method get
-     *
-     * @param key
-     * @return
-     */
-    public Object get(Object key);
+        * @param parent
+        */
+    public SessionContext(AbstractContext parent) {
+        super(parent);
+    }
 
-    /**
-     * Method put
-     *
-     * @param key
-     * @param obj
-     */
-    public void put(Object key, Object obj);
 }

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/AxisOperation.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/AxisOperation.java?rev=168587&r1=168586&r2=168587&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/AxisOperation.java
(original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/AxisOperation.java
Fri May  6 03:15:29 2005
@@ -7,7 +7,6 @@
 
 import org.apache.axis.context.MessageContext;
 import org.apache.axis.context.OperationContext;
-import org.apache.axis.context.OperationContextFactory;
 import org.apache.axis.engine.AxisFault;
 import org.apache.axis.engine.MessageReceiver;
 import org.apache.wsdl.WSDLOperation;

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/receivers/AbstractMessageReceiver.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/receivers/AbstractMessageReceiver.java?rev=168587&r1=168586&r2=168587&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/receivers/AbstractMessageReceiver.java
(original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/receivers/AbstractMessageReceiver.java
Fri May  6 03:15:29 2005
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
+
 package org.apache.axis.receivers;
 
 import javax.xml.namespace.QName;
@@ -26,10 +26,10 @@
 import org.apache.axis.engine.AxisFault;
 import org.apache.axis.engine.MessageReceiver;
 
-public abstract class AbstractMessageReceiver implements MessageReceiver{
+public abstract class AbstractMessageReceiver implements MessageReceiver {
     public static final String SERVICE_CLASS = "ServiceClass";
     public static final String SCOPE = "scope";
-    
+
     /**
      * Method makeNewServiceObject
      *
@@ -39,13 +39,15 @@
      */
     protected Object makeNewServiceObject(MessageContext msgContext) throws AxisFault {
         try {
-            AxisService service = msgContext.getOperationContext().getServiceContext().getServiceConfig();
+            AxisService service =
+                msgContext.getOperationContext().getServiceContext().getServiceConfig();
             ClassLoader classLoader = service.getClassLoader();
             Parameter implInfoParam = service.getParameter(SERVICE_CLASS);
-            if(implInfoParam != null){
-                Class implClass = Class.forName((String)implInfoParam.getValue(),true,classLoader);
-                return implClass.newInstance();            
-            }else{
+            if (implInfoParam != null) {
+                Class implClass =
+                    Class.forName((String) implInfoParam.getValue(), true, classLoader);
+                return implClass.newInstance();
+            } else {
                 throw new AxisFault("SERVICE_CLASS parameter is not specified");
             }
 
@@ -53,7 +55,7 @@
             throw AxisFault.makeFault(e);
         }
     }
-    
+
     /**
       * Method getTheImplementationObject
       *
@@ -61,32 +63,33 @@
       * @return
       * @throws AxisFault
       */
-     protected Object getTheImplementationObject(MessageContext msgContext) throws AxisFault
{
-         AxisService service = msgContext.getOperationContext().getServiceContext().getServiceConfig();
-         
-         Parameter scopeParam = service.getParameter(SCOPE); 
-         String scope = Constants.MESSAGE_SCOPE;  
-         QName serviceName = service.getName();
-         if (Constants.MESSAGE_SCOPE.equals(scope)) {
-             return makeNewServiceObject(msgContext);
-         } else if (Constants.SESSION_SCOPE.equals(scope)) {
-             SessionContext sessionContext = msgContext.getSessionContext();
-             Object obj = sessionContext.get(serviceName);
-             if (obj == null) {
-                 obj = makeNewServiceObject(msgContext);
-                 sessionContext.put(serviceName, obj);
-             }
-             return obj;
-         } else if (Constants.APPLICATION_SCOPE.equals(scope)) {
-             SessionContext globalContext = msgContext.getSessionContext();
-             Object obj = globalContext.get(serviceName);
-             if (obj == null) {
-                 obj = makeNewServiceObject(msgContext);
-                 globalContext.put(serviceName, obj);
-             }
-             return obj;
-         } else {
-             throw new AxisFault("unknown scope " + scope);
-         }
-     }
+    protected Object getTheImplementationObject(MessageContext msgContext) throws AxisFault
{
+        AxisService service =
+            msgContext.getOperationContext().getServiceContext().getServiceConfig();
+
+        Parameter scopeParam = service.getParameter(SCOPE);
+        String scope = Constants.MESSAGE_SCOPE;
+        QName serviceName = service.getName();
+        if (Constants.MESSAGE_SCOPE.equals(scope)) {
+            return makeNewServiceObject(msgContext);
+        } else if (Constants.SESSION_SCOPE.equals(scope)) {
+            SessionContext sessionContext = msgContext.getSessionContext();
+            Object obj = sessionContext.getProperty(serviceName);
+            if (obj == null) {
+                obj = makeNewServiceObject(msgContext);
+                sessionContext.setProperty(serviceName, obj);
+            }
+            return obj;
+        } else if (Constants.APPLICATION_SCOPE.equals(scope)) {
+            SessionContext globalContext = msgContext.getSessionContext();
+            Object obj = globalContext.getProperty(serviceName);
+            if (obj == null) {
+                obj = makeNewServiceObject(msgContext);
+                globalContext.setProperty(serviceName, obj);
+            }
+            return obj;
+        } else {
+            throw new AxisFault("unknown scope " + scope);
+        }
+    }
 }

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/AxisServlet.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/AxisServlet.java?rev=168587&r1=168586&r2=168587&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/AxisServlet.java
(original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/AxisServlet.java
Fri May  6 03:15:29 2005
@@ -39,7 +39,6 @@
 import org.apache.axis.context.EngineContext;
 import org.apache.axis.context.MessageContext;
 import org.apache.axis.context.SessionContext;
-import org.apache.axis.context.SimpleSessionContext;
 import org.apache.axis.engine.AxisEngine;
 import org.apache.axis.engine.AxisFault;
 import org.apache.axis.engine.EngineContextFactory;
@@ -144,7 +143,7 @@
             Object sessionContext = req.getSession().getAttribute(
                     Constants.SESSION_CONTEXT_PROPERTY);
             if (sessionContext == null) {
-                sessionContext = new SimpleSessionContext();
+                sessionContext = new SessionContext(null);
                 req.getSession().setAttribute(
                         Constants.SESSION_CONTEXT_PROPERTY, sessionContext);
             }



Mime
View raw message