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 he...@apache.org on 2004/09/23 12:58:11 UTC

svn commit: rev 47096 - in webservices/axis/trunk/java/dev/scratch/srinath_eran_jaliya/src/java/org/apache/axis: engine registry utils

Author: hemapani
Date: Thu Sep 23 03:58:11 2004
New Revision: 47096

Added:
   webservices/axis/trunk/java/dev/scratch/srinath_eran_jaliya/src/java/org/apache/axis/engine/ConcreateCommonExecuter.java
   webservices/axis/trunk/java/dev/scratch/srinath_eran_jaliya/src/java/org/apache/axis/engine/SimpleGlobal.java
   webservices/axis/trunk/java/dev/scratch/srinath_eran_jaliya/src/java/org/apache/axis/engine/SimpleModule.java
   webservices/axis/trunk/java/dev/scratch/srinath_eran_jaliya/src/java/org/apache/axis/engine/SimpleOperation.java
   webservices/axis/trunk/java/dev/scratch/srinath_eran_jaliya/src/java/org/apache/axis/engine/SimpleService.java
   webservices/axis/trunk/java/dev/scratch/srinath_eran_jaliya/src/java/org/apache/axis/engine/SimpleTransport.java
   webservices/axis/trunk/java/dev/scratch/srinath_eran_jaliya/src/java/org/apache/axis/registry/SimpleEngineRegistry.java
Modified:
   webservices/axis/trunk/java/dev/scratch/srinath_eran_jaliya/src/java/org/apache/axis/engine/AxisEngine.java
   webservices/axis/trunk/java/dev/scratch/srinath_eran_jaliya/src/java/org/apache/axis/registry/ConcreateFlow.java
   webservices/axis/trunk/java/dev/scratch/srinath_eran_jaliya/src/java/org/apache/axis/registry/ConcreateFlowInclude.java
   webservices/axis/trunk/java/dev/scratch/srinath_eran_jaliya/src/java/org/apache/axis/registry/ConcreateModuleInclude.java
   webservices/axis/trunk/java/dev/scratch/srinath_eran_jaliya/src/java/org/apache/axis/registry/ConcreateTypeMappingInclude.java
   webservices/axis/trunk/java/dev/scratch/srinath_eran_jaliya/src/java/org/apache/axis/utils/HashedBaundle.java
Log:
remove all the pooling since it simpler have without it at the engine

Modified: webservices/axis/trunk/java/dev/scratch/srinath_eran_jaliya/src/java/org/apache/axis/engine/AxisEngine.java
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/srinath_eran_jaliya/src/java/org/apache/axis/engine/AxisEngine.java	(original)
+++ webservices/axis/trunk/java/dev/scratch/srinath_eran_jaliya/src/java/org/apache/axis/engine/AxisEngine.java	Thu Sep 23 03:58:11 2004
@@ -90,7 +90,7 @@
         log.info("end the send()");
     }
     
-    public void recive(MessageContext mc)throws AxisFault{
+    public  void recive(MessageContext mc)throws AxisFault{
         Stack executionStack = new Stack();
         QName currentTansportName = null;
         QName currentServiceName = null;

Added: webservices/axis/trunk/java/dev/scratch/srinath_eran_jaliya/src/java/org/apache/axis/engine/ConcreateCommonExecuter.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/srinath_eran_jaliya/src/java/org/apache/axis/engine/ConcreateCommonExecuter.java	Thu Sep 23 03:58:11 2004
@@ -0,0 +1,205 @@
+/*
+ * Copyright 2001-2004 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.apache.axis.engine;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axis.AxisFault;
+import org.apache.axis.CommonExecutor;
+import org.apache.axis.registry.AbstractEngineElement;
+import org.apache.axis.registry.ConcreateFlowInclude;
+import org.apache.axis.registry.ConcreateModuleInclude;
+import org.apache.axis.registry.ConcreateTypeMappingInclude;
+import org.apache.axis.registry.EngineElement;
+import org.apache.axis.registry.Flow;
+import org.apache.axis.registry.FlowInclude;
+import org.apache.axis.registry.Module;
+import org.apache.axis.registry.ModuleInclude;
+import org.apache.axis.registry.TypeMapping;
+import org.apache.axis.registry.TypeMappingInclude;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * This class use delegeation to give the multiple inheritance effect 
+ * which is prefered over the generalization. 
+ * @author (Srinath Perera)hemapani@opensource.lk
+ */
+public abstract class ConcreateCommonExecuter 
+            extends AbstractEngineElement 
+            implements FlowInclude,EngineElement,
+                TypeMappingInclude,CommonExecutor,ModuleInclude {
+    private Log log = LogFactory.getLog(getClass());                    
+
+    protected HandlerInvoker invoker;    
+    //the work is delegated to ConcreateXXInclude classes                       
+    protected FlowInclude flowInclude;
+    protected ModuleInclude modules;
+    protected TypeMappingInclude typemappings;
+
+    public ConcreateCommonExecuter(){
+        invoker = new HandlerInvoker(this);
+        flowInclude = new ConcreateFlowInclude();
+        modules = new ConcreateModuleInclude();
+        typemappings = new ConcreateTypeMappingInclude();
+
+    }
+    /**
+     * @return
+     */
+    public Flow getFaultFlow() {
+        return flowInclude.getFaultFlow();
+    }
+
+    /**
+     * @return
+     */
+    public Flow getInFlow() {
+        return flowInclude.getInFlow();
+    }
+
+    /**
+     * @return
+     */
+    public Flow getOutFlow() {
+        return flowInclude.getOutFlow();
+    }
+
+    /**
+     * @param flow
+     */
+    public void setFaultFlow(Flow flow) {
+        flowInclude.setFaultFlow(flow);
+    }
+
+    /**
+     * @param flow
+     */
+    public void setInFlow(Flow flow) {
+        flowInclude.setInFlow(flow);
+    }
+
+    /**
+     * @param flow
+     */
+    public void setOutFlow(Flow flow) {
+        flowInclude.setOutFlow(flow);
+    }
+
+    /**
+     * @param typeMapping
+     */
+    public void addTypeMapping(TypeMapping typeMapping) {
+        typemappings.addTypeMapping(typeMapping);
+    }
+
+    /**
+     * @param javaType
+     * @return
+     */
+    public TypeMapping getTypeMapping(Class javaType) {
+        return typemappings.getTypeMapping(javaType);
+    }
+
+    /**
+     * @param index
+     * @return
+     */
+    public TypeMapping getTypeMapping(int index) {
+        return typemappings.getTypeMapping(index);
+    }
+
+    /**
+     * @param xmlType
+     * @return
+     */
+    public TypeMapping getTypeMapping(QName xmlType) {
+        return typemappings.getTypeMapping(xmlType);
+    }
+
+    /**
+     * @return
+     */
+    public int getTypeMappingCount() {
+        return typemappings.getTypeMappingCount();
+    }
+
+    /**
+     * @param module
+     */
+    public void addModule(Module module) {
+        modules.addModule(module);
+    }
+
+    /**
+     * @param index
+     * @return
+     */
+    public Module getModule(int index) {
+        return modules.getModule(index);
+    }
+
+    /**
+     * @return
+     */
+    public int getModuleCount() {
+        return modules.getModuleCount();
+    }
+
+    public void processFaultFlow(MessageContext mc) throws AxisFault {
+        invoker.addFlow(getFaultFlow());
+        int moduleCount = getModuleCount();
+        for(int i = 0;i<moduleCount;i++){
+            Module module = getModule(i);
+            invoker.addFlow(module.getFaultFlow());
+        }
+        invoker.orderTheHandlers();
+        invoker.invoke(mc);
+    }
+
+    
+    public void recive(MessageContext mc) throws AxisFault {
+        invoker.addFlow(getInFlow());
+        int moduleCount = getModuleCount();
+        for(int i = 0;i<moduleCount;i++){
+            Module module = getModule(i);
+            invoker.addFlow(module.getInFlow());
+        }
+        invoker.orderTheHandlers();
+        invoker.invoke(mc);
+        log.info("invoked "+getClass());
+    }
+
+    public void rollback(MessageContext mc) throws AxisFault {
+        invoker.revoke(mc);
+    }
+
+    public void send(MessageContext mc) throws AxisFault {
+        invoker.addFlow(getOutFlow());
+        int moduleCount = getModuleCount();
+        for(int i = 0;i<moduleCount;i++){
+            Module module = getModule(i);
+            invoker.addFlow(module.getOutFlow());
+        }
+        invoker.orderTheHandlers();
+        invoker.invoke(mc);
+        log.info("invoked "+getClass());
+    }
+
+
+
+}

Added: webservices/axis/trunk/java/dev/scratch/srinath_eran_jaliya/src/java/org/apache/axis/engine/SimpleGlobal.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/srinath_eran_jaliya/src/java/org/apache/axis/engine/SimpleGlobal.java	Thu Sep 23 03:58:11 2004
@@ -0,0 +1,25 @@
+/*
+ * Copyright 2001-2004 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.apache.axis.engine;
+
+
+
+public class SimpleGlobal extends ConcreateCommonExecuter implements Global{
+    public SimpleGlobal() {
+    }
+
+}

Added: webservices/axis/trunk/java/dev/scratch/srinath_eran_jaliya/src/java/org/apache/axis/engine/SimpleModule.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/srinath_eran_jaliya/src/java/org/apache/axis/engine/SimpleModule.java	Thu Sep 23 03:58:11 2004
@@ -0,0 +1,104 @@
+/*
+ * Copyright 2001-2004 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.apache.axis.engine;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axis.registry.AbstractEngineElement;
+import org.apache.axis.registry.Flow;
+import org.apache.axis.registry.Module;
+import org.apache.axis.registry.TypeMapping;
+
+public class SimpleModule extends AbstractEngineElement implements Module{
+    private Flow in;
+    private Flow out;
+    private Flow fault;
+    private QName name;
+    
+    public SimpleModule(QName name){
+        this.name = name;
+    }
+    public Flow getFaultFlow() {
+        return fault;
+    }
+
+    public Flow getInFlow() {
+        return in;
+    }
+
+    public Flow getOutFlow() {
+        return out;
+    }
+
+    public void setFaultFlow(Flow flow) {
+        this.fault = flow;
+    }
+
+    public void setInFlow(Flow flow) {
+        this.in = flow;
+    }
+
+    public void setOutFlow(Flow flow) {
+        this.out = flow;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.axis.registry.TypeMappingInclude#addTypeMapping(org.apache.axis.registry.TypeMapping)
+     */
+    public void addTypeMapping(TypeMapping typeMapping) {
+        // TODO Auto-generated method stub
+
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.axis.registry.TypeMappingInclude#getTypeMapping(java.lang.Class)
+     */
+    public TypeMapping getTypeMapping(Class javaType) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.axis.registry.TypeMappingInclude#getTypeMapping(int)
+     */
+    public TypeMapping getTypeMapping(int index) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.axis.registry.TypeMappingInclude#getTypeMapping(javax.xml.namespace.QName)
+     */
+    public TypeMapping getTypeMapping(QName xmlType) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.axis.registry.TypeMappingInclude#getTypeMappingCount()
+     */
+    public int getTypeMappingCount() {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+    
+    public QName getName() {
+        return name;
+    }
+
+
+}

Added: webservices/axis/trunk/java/dev/scratch/srinath_eran_jaliya/src/java/org/apache/axis/engine/SimpleOperation.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/srinath_eran_jaliya/src/java/org/apache/axis/engine/SimpleOperation.java	Thu Sep 23 03:58:11 2004
@@ -0,0 +1,59 @@
+/*
+ * Copyright 2001-2004 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.apache.axis.engine;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axis.AxisFault;
+import org.apache.axis.Handler;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+public class SimpleOperation extends ConcreateCommonExecuter implements Operation{
+    private Log log = LogFactory.getLog(getClass());   
+    private QName name;
+    private Handler provider;
+    
+    
+    public SimpleOperation(QName name){
+        this.name = name;
+    }
+    public void recive(MessageContext mc) throws AxisFault {
+        super.recive(mc);
+        Handler provider = getProvider();
+        if(provider != null){
+            log.info("invoking the Provider");
+            provider.invoke(mc);            
+        }
+    }
+
+    public void send(MessageContext mc) throws AxisFault {
+        super.send(mc);
+    }
+    public QName getName() {
+        return name;
+    }
+
+    public Handler getProvider() {
+        return provider;
+    }
+
+    public void setProvider(Handler handler) {
+        provider = handler;
+    }
+
+}

Added: webservices/axis/trunk/java/dev/scratch/srinath_eran_jaliya/src/java/org/apache/axis/engine/SimpleService.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/srinath_eran_jaliya/src/java/org/apache/axis/engine/SimpleService.java	Thu Sep 23 03:58:11 2004
@@ -0,0 +1,71 @@
+/*
+ * Copyright 2001-2004 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.apache.axis.engine;
+
+import java.util.HashMap;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axis.AxisFault;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+public class SimpleService extends ConcreateCommonExecuter implements Service{
+    private Log log = LogFactory.getLog(getClass());     
+    private HashMap operations = new HashMap();
+    private QName name;
+    
+    public SimpleService(QName name){
+        this.name = name;
+    } 
+    public ClassLoader getClassLoader() {
+        return Thread.currentThread().getContextClassLoader();
+    }
+
+    public Operation getOperation(QName index) {
+        return (Operation)operations.get(index);
+    }
+
+    public int getOperationCount() {
+        return operations.size();
+    }
+
+    public void recive(MessageContext mc) throws AxisFault {
+        super.recive(mc);  
+        QName methodName = mc.getCurrentOperation();
+        Operation operation = getOperation(methodName);
+        log.info("find operation "+methodName); 
+        operation.recive(mc);
+    }
+
+    public void send(MessageContext mc) throws AxisFault {
+        super.send(mc);        
+        QName methodName = mc.getCurrentOperation();
+        Operation operation = getOperation(methodName);
+        log.info("find operation "+methodName); 
+        operation.send(mc);
+    }
+
+    public QName getName() {
+        return name;
+    }
+
+    public void addOperation(Operation op) {
+        operations.put(op.getName(),op);
+    }
+
+}

Added: webservices/axis/trunk/java/dev/scratch/srinath_eran_jaliya/src/java/org/apache/axis/engine/SimpleTransport.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/srinath_eran_jaliya/src/java/org/apache/axis/engine/SimpleTransport.java	Thu Sep 23 03:58:11 2004
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2001-2004 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.apache.axis.engine;
+
+import javax.xml.namespace.QName;
+
+public class SimpleTransport extends ConcreateCommonExecuter implements Transport{
+    private QName name;
+    
+    public SimpleTransport(QName name){
+        this.name = name;
+    }
+
+    public QName getName() {
+        return name;
+    }
+
+}

Modified: webservices/axis/trunk/java/dev/scratch/srinath_eran_jaliya/src/java/org/apache/axis/registry/ConcreateFlow.java
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/srinath_eran_jaliya/src/java/org/apache/axis/registry/ConcreateFlow.java	(original)
+++ webservices/axis/trunk/java/dev/scratch/srinath_eran_jaliya/src/java/org/apache/axis/registry/ConcreateFlow.java	Thu Sep 23 03:58:11 2004
@@ -16,7 +16,7 @@
 
 package org.apache.axis.registry;
 
-import java.util.ArrayList;
+import java.util.Vector;
 
 import org.apache.axis.Handler;
 
@@ -24,11 +24,11 @@
  * @author hemapani@opensource.lk
  */
 public class ConcreateFlow implements Flow {
-   protected ArrayList list = null; 
+   protected Vector list = null; 
    public ConcreateFlow(){
-        list = new ArrayList();
+        list = new Vector();
    }
-   public synchronized void addHandler(Handler handler) {
+   public void addHandler(Handler handler) {
        list.add(handler);
    }
    public Handler getHandler(int index) {

Modified: webservices/axis/trunk/java/dev/scratch/srinath_eran_jaliya/src/java/org/apache/axis/registry/ConcreateFlowInclude.java
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/srinath_eran_jaliya/src/java/org/apache/axis/registry/ConcreateFlowInclude.java	(original)
+++ webservices/axis/trunk/java/dev/scratch/srinath_eran_jaliya/src/java/org/apache/axis/registry/ConcreateFlowInclude.java	Thu Sep 23 03:58:11 2004
@@ -35,15 +35,15 @@
         return out;
     }
 
-    public synchronized void setFaultFlow(Flow flow) {
+    public void setFaultFlow(Flow flow) {
         this.fault = flow;
     }
 
-    public synchronized void setInFlow(Flow flow) {
+    public void setInFlow(Flow flow) {
         this.in = flow;
     }
 
-    public synchronized void setOutFlow(Flow flow) {
+    public void setOutFlow(Flow flow) {
         this.out = flow;
     }
 }

Modified: webservices/axis/trunk/java/dev/scratch/srinath_eran_jaliya/src/java/org/apache/axis/registry/ConcreateModuleInclude.java
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/srinath_eran_jaliya/src/java/org/apache/axis/registry/ConcreateModuleInclude.java	(original)
+++ webservices/axis/trunk/java/dev/scratch/srinath_eran_jaliya/src/java/org/apache/axis/registry/ConcreateModuleInclude.java	Thu Sep 23 03:58:11 2004
@@ -16,16 +16,16 @@
 
 package org.apache.axis.registry;
 
-import java.util.ArrayList;
+import java.util.Vector;
 
 /**
  * @author hemapani@opensource.lk
  */
 public class ConcreateModuleInclude implements ModuleInclude {
-    private ArrayList modules;
+    private Vector modules;
 
     public ConcreateModuleInclude(){
-        this.modules = new ArrayList();
+        this.modules = new Vector();
     }
     public Module getModule(int index) {
         return (Module)modules.get(index);
@@ -33,7 +33,7 @@
     public int getModuleCount() {
        return modules.size();
     }
-    public synchronized void addModule(Module module) {
+    public void addModule(Module module) {
         modules.add(module);
     }
 }

Modified: webservices/axis/trunk/java/dev/scratch/srinath_eran_jaliya/src/java/org/apache/axis/registry/ConcreateTypeMappingInclude.java
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/srinath_eran_jaliya/src/java/org/apache/axis/registry/ConcreateTypeMappingInclude.java	(original)
+++ webservices/axis/trunk/java/dev/scratch/srinath_eran_jaliya/src/java/org/apache/axis/registry/ConcreateTypeMappingInclude.java	Thu Sep 23 03:58:11 2004
@@ -16,8 +16,8 @@
 
 package org.apache.axis.registry;
 
-import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.Vector;
 
 import javax.xml.namespace.QName;
 
@@ -27,15 +27,15 @@
 public class ConcreateTypeMappingInclude implements TypeMappingInclude{
     private HashMap javamapping;
     private HashMap xmlmapping;
-    private ArrayList mappingValues;
+    private Vector mappingValues;
     
     public ConcreateTypeMappingInclude(){
         javamapping = new HashMap();
         xmlmapping = new HashMap();
-        mappingValues = new ArrayList();
+        mappingValues = new Vector();
     }
     
-    public synchronized void addTypeMapping(TypeMapping typeMapping) {
+    public void addTypeMapping(TypeMapping typeMapping) {
         mappingValues.add(typeMapping); 
         javamapping.put(typeMapping.getJavaType().getName(),typeMapping); 
         xmlmapping.put(typeMapping.getXMLType(),typeMapping);

Added: webservices/axis/trunk/java/dev/scratch/srinath_eran_jaliya/src/java/org/apache/axis/registry/SimpleEngineRegistry.java
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/srinath_eran_jaliya/src/java/org/apache/axis/registry/SimpleEngineRegistry.java	Thu Sep 23 03:58:11 2004
@@ -0,0 +1,108 @@
+/*
+ * Copyright 2001-2004 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.apache.axis.registry;
+
+import java.util.ArrayList;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axis.AxisFault;
+import org.apache.axis.engine.Global;
+import org.apache.axis.engine.Service;
+import org.apache.axis.engine.Transport;
+import org.apache.axis.utils.HashedBaundle;
+
+public class SimpleEngineRegistry implements EngineRegistry{
+    private HashedBaundle modules;
+    private HashedBaundle transports;
+    private HashedBaundle services;
+    private Global global;
+    
+    public SimpleEngineRegistry(Global global){
+        this.modules = new HashedBaundle();
+        this.transports = new HashedBaundle();
+        this.services = new HashedBaundle();
+        this.global = global;
+    
+    }
+    public Global getGlobal() throws AxisFault {
+        return global;
+    }
+
+    public Module getModule(int index) throws AxisFault {
+        return (Module)modules.get(index);
+    }
+
+    public Module getModule(QName name) throws AxisFault {
+        return (Module)modules.get(name);
+    }
+
+    public int getModuleCount() throws AxisFault {
+        return modules.getCount();
+    }
+
+    public ArrayList getPahsesInOrder() throws AxisFault {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public Service getService(int index) throws AxisFault {
+        return (Service)services.get(index);
+    }
+
+    public Service getService(QName name) throws AxisFault {
+        return (Service)services.get(name);
+    }
+
+    public int getServiceCount() throws AxisFault {
+        return services.getCount();
+    }
+
+    public Transport getTransPort(int index) throws AxisFault {
+        return (Transport)transports.get(index);
+    }
+
+    public Transport getTransPort(QName name) throws AxisFault {
+        return (Transport)transports.get(name);
+    }
+
+    public int getTransportCount() throws AxisFault {
+        return transports.getCount();
+    }
+
+    public void addMdoule(Module module) throws AxisFault {
+        modules.add(module.getName(),module);
+    }
+
+    public void addService(Service service) throws AxisFault {
+        services.add(service.getName(),service);
+
+    }
+
+    public void addTransport(Transport transport) throws AxisFault {
+        transports.add(transport.getName(),transport);
+    }
+
+    public void removeService(QName name) throws AxisFault {
+        services.remove(name);
+    }
+
+    public void removeTransport(QName name) throws AxisFault {
+        transports.remove(name);
+    }
+
+}

Modified: webservices/axis/trunk/java/dev/scratch/srinath_eran_jaliya/src/java/org/apache/axis/utils/HashedBaundle.java
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/srinath_eran_jaliya/src/java/org/apache/axis/utils/HashedBaundle.java	(original)
+++ webservices/axis/trunk/java/dev/scratch/srinath_eran_jaliya/src/java/org/apache/axis/utils/HashedBaundle.java	Thu Sep 23 03:58:11 2004
@@ -20,7 +20,7 @@
 import java.util.HashMap;
 
 /**
- * @author hemapani@opensource.lk
+ * @author Srinath Perera(hemapani@opensource.lk)
  */
 public class HashedBaundle {
     private ArrayList list;