Author: dims
Date: Wed Aug 2 12:58:33 2006
New Revision: 428122
URL: http://svn.apache.org/viewvc?rev=428122&view=rev
Log:
the list of global engaged modules should not be in the builder or the
deployment engine, it should be in AxisConfiguration itself
Modified:
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/AxisConfigBuilder.java
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentEngine.java
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfiguration.java
Modified:
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/AxisConfigBuilder.java
URL:
http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/AxisConfigBuilder.java?rev=428122&r1=428121&r2=428122&view=diff
==============================================================================
---
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/AxisConfigBuilder.java
(original)
+++
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/AxisConfigBuilder.java
Wed Aug 2 12:58:33 2006
@@ -22,7 +22,12 @@
import org.apache.axis2.AxisFault;
import org.apache.axis2.deployment.util.PhasesInfo;
import org.apache.axis2.deployment.util.Utils;
-import org.apache.axis2.description.*;
+import org.apache.axis2.description.HandlerDescription;
+import org.apache.axis2.description.ModuleConfiguration;
+import org.apache.axis2.description.ParameterInclude;
+import org.apache.axis2.description.PolicyInclude;
+import org.apache.axis2.description.TransportInDescription;
+import org.apache.axis2.description.TransportOutDescription;
import org.apache.axis2.engine.AxisConfiguration;
import org.apache.axis2.engine.AxisObserver;
import org.apache.axis2.engine.MessageReceiver;
@@ -38,17 +43,15 @@
import javax.xml.stream.XMLStreamException;
import java.io.InputStream;
import java.util.ArrayList;
+import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
-import java.util.Collection;
public class AxisConfigBuilder extends DescriptionBuilder {
protected static final Log log =
LogFactory.getLog(AxisConfigBuilder.class);
- private List moduleList = new ArrayList();
-
public AxisConfigBuilder(InputStream serviceInputStream,
AxisConfiguration axisConfiguration) {
super(serviceInputStream, axisConfiguration);
@@ -81,7 +84,7 @@
Iterator moduleitr =
config_element.getChildrenWithName(new
QName(DeploymentConstants.TAG_MODULE));
- processModuleRefs(moduleitr);
+ processModuleRefs(moduleitr, axisConfig);
// Proccessing Transport Senders
Iterator trs_senders = config_element.getChildrenWithName(new
QName(TAG_TRANSPORT_SENDER));
@@ -160,13 +163,14 @@
/**
* Update the list of modules that is required to be engaged globally.
*/
- protected void processModuleRefs(Iterator moduleRefs) {
+ protected void processModuleRefs(Iterator moduleRefs, AxisConfiguration
config) {
+ List globalModules = config.getGlobalModules();
while (moduleRefs.hasNext()) {
OMElement moduleref = (OMElement) moduleRefs.next();
OMAttribute moduleRefAttribute = moduleref.getAttribute(new
QName(TAG_REFERENCE));
String refName = moduleRefAttribute.getAttributeValue();
- moduleList.add(new QName(refName));
+ globalModules.add(new QName(refName));
}
}
@@ -394,12 +398,5 @@
}
Class phaseClass =
axisConfig.getSystemClassLoader().loadClass(className);
return (Phase) phaseClass.newInstance();
- }
-
- /**
- * Gets the list of modules that is required to be engaged globally.
- */
- protected Collection getGlobalModules() {
- return moduleList;
}
}
Modified:
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentEngine.java
URL:
http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentEngine.java?rev=428122&r1=428121&r2=428122&view=diff
==============================================================================
---
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentEngine.java
(original)
+++
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentEngine.java
Wed Aug 2 12:58:33 2006
@@ -64,11 +64,6 @@
*/
private List wsToUnDeploy = new ArrayList();
- /**
- * Stores the module specified in the server.xml at the document parsing
time.
- */
- private List moduleList = new ArrayList();
-
//to keep the web resource location if any
private String webLocationString = null;
@@ -310,16 +305,6 @@
return axisConfig.getMessageReceiver(mepURL);
}
- /**
- * Adds module references to the list while parsing the axis2.xml file.
- * time none of module availble (they load after parsing the document)
- *
- * @param moduleName <code>QName</code>
- */
- public void addModule(QName moduleName) {
- moduleList.add(moduleName);
- }
-
private void addNewModule(AxisModule modulemetadata) throws AxisFault {
Flow inflow = modulemetadata.getInFlow();
@@ -738,7 +723,7 @@
* Checks if the modules, referred by server.xml, exist or that they are
deployed.
*/
public void engageModules() throws AxisFault {
- for (Iterator iterator = moduleList.iterator(); iterator.hasNext();) {
+ for (Iterator iterator = axisConfig.getGlobalModules().iterator();
iterator.hasNext();) {
QName name = (QName) iterator.next();
axisConfig.engageModule(name);
}
@@ -766,7 +751,6 @@
public AxisConfiguration populateAxisConfiguration(InputStream in) throws
DeploymentException {
axisConfig = new AxisConfiguration();
AxisConfigBuilder builder = new AxisConfigBuilder(in, axisConfig);
- moduleList.addAll(builder.getGlobalModules());
builder.populateConfig();
try {
if (in != null) {
@@ -1000,9 +984,5 @@
public void setWebLocationString(String webLocationString) {
this.webLocationString = webLocationString;
- }
-
- public List getModuleList() {
- return moduleList;
}
}
Modified:
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfiguration.java
URL:
http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfiguration.java?rev=428122&r1=428121&r2=428122&view=diff
==============================================================================
---
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfiguration.java
(original)
+++
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfiguration.java
Wed Aug 2 12:58:33 2006
@@ -65,6 +65,11 @@
private HashMap allservices = new HashMap();
/**
+ * Stores the module specified in the server.xml at the document parsing
time.
+ */
+ private List globalModuleList;
+
+ /**
* Field engagedModules
*/
private final List engagedModules;
@@ -108,6 +113,7 @@
public AxisConfiguration() {
moduleConfigmap = new HashMap();
engagedModules = new ArrayList();
+ globalModuleList = new ArrayList();
messageReceivers = new HashMap();
outPhases = new ArrayList();
inFaultPhases = new ArrayList();
@@ -482,6 +488,10 @@
return engagedModules;
}
+ public List getGlobalModules() {
+ return globalModuleList;
+ }
+
public Hashtable getFaultyModules() {
return faultyModules;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]