You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ch...@apache.org on 2007/03/15 06:36:00 UTC

svn commit: r518489 - in /webservices/axis2/trunk/java/modules: clustering/src/org/apache/axis2/cluster/handlers/ clustering/src/org/apache/axis2/cluster/listeners/ clustering/src/org/apache/axis2/cluster/tribes/ clustering/src/org/apache/axis2/cluster...

Author: chamikara
Date: Wed Mar 14 22:35:57 2007
New Revision: 518489

URL: http://svn.apache.org/viewvc?view=rev&rev=518489
Log:
Removed the AxisFault from the Handler.flowComplete method as discussed in the dev list.
Completed the missing parts of the ConfigurationManager for tribes.

Added:
    webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/listeners/
    webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/listeners/DefaultContextManagerListener.java
    webservices/axis2/trunk/java/modules/clustering/test/org/apache/axis2/clustering/configuration/
    webservices/axis2/trunk/java/modules/clustering/test/org/apache/axis2/clustering/configuration/ConfigurationManagerTestCase.java
    webservices/axis2/trunk/java/modules/clustering/test/org/apache/axis2/clustering/configuration/TestConfigurationManagerListener.java
    webservices/axis2/trunk/java/modules/clustering/test/org/apache/axis2/clustering/tribes/ConfigurationManagerTest.java
Removed:
    webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/context/TribesContextManagerListener.java
Modified:
    webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/handlers/ReplicationHandler.java
    webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/ChannelListener.java
    webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/TribesClusterManager.java
    webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/configuration/ConfigurationCommand.java
    webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/configuration/TribesConfigurationManager.java
    webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/context/ContextCommandMessage.java
    webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/context/TribesContextManager.java
    webservices/axis2/trunk/java/modules/clustering/test/org/apache/axis2/clustering/ClusterManagerTestCase.java
    webservices/axis2/trunk/java/modules/clustering/test/org/apache/axis2/clustering/ManageContextTestCase.java
    webservices/axis2/trunk/java/modules/clustering/test/org/apache/axis2/clustering/UpdateStateTestCase.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/cluster/configuration/ConfigurationEvent.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AxisEngine.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/Handler.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/Phase.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/handlers/AbstractHandler.java

Modified: webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/handlers/ReplicationHandler.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/handlers/ReplicationHandler.java?view=diff&rev=518489&r1=518488&r2=518489
==============================================================================
--- webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/handlers/ReplicationHandler.java (original)
+++ webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/handlers/ReplicationHandler.java Wed Mar 14 22:35:57 2007
@@ -40,10 +40,15 @@
 		return InvocationResponse.CONTINUE;
 	}
 
-	public void flowComplete(MessageContext msgContext) throws AxisFault {
+	public void flowComplete(MessageContext msgContext) {
 		super.flowComplete(msgContext);
 
-		replicateState(msgContext);
+		try {
+			replicateState(msgContext);
+		} catch (ClusteringFault e) {
+			String message = "Could not replicate the state";
+			log.error(message);
+		}
 	}
 
 	private void replicateState(MessageContext message) throws ClusteringFault {

Added: webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/listeners/DefaultContextManagerListener.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/listeners/DefaultContextManagerListener.java?view=auto&rev=518489
==============================================================================
--- webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/listeners/DefaultContextManagerListener.java (added)
+++ webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/listeners/DefaultContextManagerListener.java Wed Mar 14 22:35:57 2007
@@ -0,0 +1,123 @@
+/*
+ * 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.apache.axis2.cluster.listeners;
+
+import java.util.Iterator;
+import java.util.Map;
+
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.cluster.context.ContextEvent;
+import org.apache.axis2.cluster.context.ContextManagerListener;
+import org.apache.axis2.cluster.tribes.context.ContextType;
+import org.apache.axis2.cluster.tribes.context.ContextUpdater;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.context.ServiceContext;
+import org.apache.axis2.context.ServiceGroupContext;
+import org.apache.axis2.description.AxisService;
+import org.apache.axis2.description.AxisServiceGroup;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+public class DefaultContextManagerListener implements ContextManagerListener {
+
+	ContextUpdater updater = null;
+	ConfigurationContext configurationContext = null;
+	private static final Log log = LogFactory.getLog(DefaultContextManagerListener.class);
+	
+	public DefaultContextManagerListener (ConfigurationContext configurationContext) {
+		this.configurationContext = configurationContext;
+	}
+	
+	public ContextUpdater getUpdater() {
+		return updater;
+	}
+
+	public void setUpdater(ContextUpdater updater) {
+		this.updater = updater;
+	}
+
+	public void contextAdded(ContextEvent event) {
+		
+		try {
+			
+			if (event.getContextType()==ContextType.SERVICE_GROUP_CONTEXT) {
+				AxisServiceGroup axisServiceGroup = configurationContext.getAxisConfiguration()
+								.getServiceGroup(event.getDescriptionID());
+				ServiceGroupContext ctx = new ServiceGroupContext(configurationContext, axisServiceGroup);
+				ctx.setId(event.getContextID());
+				configurationContext.registerServiceGroupContextintoSoapSessionTable(ctx);
+			} else if (event.getContextType()==ContextType.SERVICE_CONTEXT) {
+				AxisService axisService = configurationContext.getAxisConfiguration().
+								getService(event.getContextID ());
+				ServiceGroupContext srvGrpCtx = configurationContext.getServiceGroupContext(event
+								.getParentContextID ());
+				// This will create service context if one is not available
+				srvGrpCtx.getServiceContext(axisService);
+			}
+			
+		} catch (AxisFault e) {
+			e.printStackTrace();
+		}
+		
+	}
+
+	public void contextRemoved(ContextEvent event) {
+
+	}
+
+	public void contextUpdated(ContextEvent event) {
+
+		if (event.getContextType()==ContextType.SERVICE_GROUP_CONTEXT) {
+			
+			ServiceGroupContext srvGrpCtx = configurationContext.getServiceGroupContext(
+							event.getContextID());
+			Map props = updater.getServiceGroupProps(event.getContextID());
+			if (props != null)
+				srvGrpCtx.setProperties(props);
+				
+		} else if (event.getContextType() == ContextType.SERVICE_CONTEXT) {
+
+			ServiceGroupContext srvGrpCtx = configurationContext.getServiceGroupContext
+							(event.getParentContextID ());
+			Iterator iter = srvGrpCtx.getServiceContexts();
+			String serviceCtxName = event.getDescriptionID();
+			ServiceContext serviceContext = null;
+			while (iter.hasNext()) {
+				ServiceContext serviceContext2 = (ServiceContext) iter.next();
+				if (serviceContext2.getName() != null
+						&& serviceContext2.getName().equals(serviceCtxName))
+					serviceContext = serviceContext2;
+			}
+
+			if (serviceContext != null) {
+
+				Map srvProps = updater.getServiceProps(event.getParentContextID(), event.getContextID());
+
+				if (srvProps != null) {
+					serviceContext.setProperties(srvProps);
+				}
+
+			} else {
+				String message = "Cannot find the ServiceContext with the ID:" + serviceCtxName;
+				log.error(message);
+			}
+
+		}
+		
+	}
+
+}

Modified: webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/ChannelListener.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/ChannelListener.java?view=diff&rev=518489&r1=518488&r2=518489
==============================================================================
--- webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/ChannelListener.java (original)
+++ webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/ChannelListener.java Wed Mar 14 22:35:57 2007
@@ -19,7 +19,11 @@
 import java.io.Serializable;
 import java.util.Map;
 
+import org.apache.axis2.cluster.ClusteringFault;
+import org.apache.axis2.cluster.configuration.ConfigurationEvent;
 import org.apache.axis2.cluster.context.ContextEvent;
+import org.apache.axis2.cluster.tribes.configuration.ConfigurationCommand;
+import org.apache.axis2.cluster.tribes.configuration.TribesConfigurationManager;
 import org.apache.axis2.cluster.tribes.context.ContextCommandMessage;
 import org.apache.axis2.cluster.tribes.context.ContextListenerEventType;
 import org.apache.axis2.cluster.tribes.context.ContextType;
@@ -27,16 +31,30 @@
 import org.apache.axis2.cluster.tribes.context.ContextUpdater;
 import org.apache.axis2.cluster.tribes.context.TribesContextManager;
 import org.apache.catalina.tribes.Member;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 
 public class ChannelListener implements org.apache.catalina.tribes.ChannelListener {
 
 	ContextUpdater updater = null;
 	TribesContextManager contextManager = null;
+	TribesConfigurationManager configurationManager = null;
+	
+    private static final Log log = LogFactory.getLog(ChannelListener.class);
+    
+	public ChannelListener (TribesConfigurationManager configurationManager, TribesContextManager contextManager) {
+		this.configurationManager = configurationManager;
+		this.contextManager = contextManager;
+	}
 	
 	public void setContextManager(TribesContextManager contextManager) {
 		this.contextManager = contextManager;
 	}
+	
+	public void setConfigurationManager(TribesConfigurationManager configurationManager) {
+		this.configurationManager = configurationManager;
+	}
 
 	public void setUpdater(ContextUpdater updater) {
 		this.updater = updater;
@@ -48,48 +66,20 @@
 
 	public void messageReceived(Serializable msg, Member sender) {
 
-		if (!(msg instanceof ContextCommandMessage)) {
-			return;
-		}
-
-		ContextCommandMessage comMsg = (ContextCommandMessage) msg;
-
-		// TODO make sure to remove from the duplicate lists when remove is
-		// requested for both service group and service contexts
-		// TODO fix this to support scopes other than SOAP Session.
-
-		if (comMsg.getCommandType() == CommandType.CREATE_SERVICE_GROUP_CONTEXT) {
-
-			// add to the duplicate list to prevent cyclic replication
-			contextManager.addToDuplicateServiceGroupContexts(comMsg.getContextId());
-			updater.addServiceGroupContext(comMsg.getContextId());
-
-			ContextEvent event = new ContextEvent();
-			event.setContextType(ContextType.SERVICE_GROUP_CONTEXT);
-			event.setContextID(comMsg.getContextId());
-			event.setParentContextID(comMsg.getParentId());
-			event.setDescriptionID(comMsg.getAxisDescriptionName());
-
-			contextManager.notifyListeners(event, ContextListenerEventType.ADD_CONTEXT);
-
-		} else if (comMsg.getCommandType() == CommandType.CREATE_SERVICE_CONTEXT) {
-
-			// add to the duplicate list to prevent cyclic replication
-			contextManager.addToDuplicateServiceContexts(comMsg.getParentId()
-					+ comMsg.getContextId());
-			updater.addServiceContext(comMsg.getParentId(), comMsg.getContextId());
-
-			ContextEvent event = new ContextEvent();
-			event.setContextType(ContextType.SERVICE_CONTEXT);
-			event.setContextID(comMsg.getContextId());
-			event.setParentContextID(comMsg.getParentId());
-			event.setDescriptionID(comMsg.getAxisDescriptionName());
-
-			contextManager.notifyListeners(event, ContextListenerEventType.ADD_CONTEXT);
-
-		} else if (comMsg.getCommandType() == CommandType.UPDATE_STATE) {
-
-			if (comMsg.getContextType() == ContextType.SERVICE_GROUP_CONTEXT) {
+		
+		if (msg instanceof ContextCommandMessage) {
+			
+			ContextCommandMessage comMsg = (ContextCommandMessage) msg;
+
+			// TODO make sure to remove from the duplicate lists when remove is
+			// requested for both service group and service contexts
+			// TODO fix this to support scopes other than SOAP Session.
+
+			if (comMsg.getCommandType() == CommandType.CREATE_SERVICE_GROUP_CONTEXT) {
+
+				// add to the duplicate list to prevent cyclic replication
+				contextManager.addToDuplicateServiceGroupContexts(comMsg.getContextId());
+				updater.addServiceGroupContext(comMsg.getContextId());
 
 				ContextEvent event = new ContextEvent();
 				event.setContextType(ContextType.SERVICE_GROUP_CONTEXT);
@@ -97,9 +87,14 @@
 				event.setParentContextID(comMsg.getParentId());
 				event.setDescriptionID(comMsg.getAxisDescriptionName());
 
-				contextManager.notifyListeners(event, ContextListenerEventType.UPDATE_CONTEXT);
+				contextManager.notifyListeners(event, ContextListenerEventType.ADD_CONTEXT);
 
-			} else if (comMsg.getContextType() == ContextType.SERVICE_CONTEXT) {
+			} else if (comMsg.getCommandType() == CommandType.CREATE_SERVICE_CONTEXT) {
+
+				// add to the duplicate list to prevent cyclic replication
+				contextManager.addToDuplicateServiceContexts(comMsg.getParentId()
+						+ comMsg.getContextId());
+				updater.addServiceContext(comMsg.getParentId(), comMsg.getContextId());
 
 				ContextEvent event = new ContextEvent();
 				event.setContextType(ContextType.SERVICE_CONTEXT);
@@ -107,28 +102,97 @@
 				event.setParentContextID(comMsg.getParentId());
 				event.setDescriptionID(comMsg.getAxisDescriptionName());
 
-				contextManager.notifyListeners(event, ContextListenerEventType.UPDATE_CONTEXT);
+				contextManager.notifyListeners(event, ContextListenerEventType.ADD_CONTEXT);
 
-			}
+			} else if (comMsg.getCommandType() == CommandType.UPDATE_STATE) {
+
+				if (comMsg.getContextType() == ContextType.SERVICE_GROUP_CONTEXT) {
+
+					ContextEvent event = new ContextEvent();
+					event.setContextType(ContextType.SERVICE_GROUP_CONTEXT);
+					event.setContextID(comMsg.getContextId());
+					event.setParentContextID(comMsg.getParentId());
+					event.setDescriptionID(comMsg.getAxisDescriptionName());
+
+					contextManager.notifyListeners(event, ContextListenerEventType.UPDATE_CONTEXT);
+
+				} else if (comMsg.getContextType() == ContextType.SERVICE_CONTEXT) {
 
-		} else if (comMsg.getCommandType() == CommandType.UPDATE_STATE_MAP_ENTRY) {
+					ContextEvent event = new ContextEvent();
+					event.setContextType(ContextType.SERVICE_CONTEXT);
+					event.setContextID(comMsg.getContextId());
+					event.setParentContextID(comMsg.getParentId());
+					event.setDescriptionID(comMsg.getAxisDescriptionName());
+
+					contextManager.notifyListeners(event, ContextListenerEventType.UPDATE_CONTEXT);
 
-			ContextUpdateEntryCommandMessage mapEntryMsg = (ContextUpdateEntryCommandMessage) comMsg;
-			if (mapEntryMsg.getCtxType() == ContextUpdateEntryCommandMessage.SERVICE_GROUP_CONTEXT) {
-				Map props = updater.getServiceGroupProps(comMsg.getContextId());
-				if (mapEntryMsg.getOperation() == ContextUpdateEntryCommandMessage.ADD_OR_UPDATE_ENTRY) {
-					props.put(mapEntryMsg.getKey(), mapEntryMsg.getValue());
-				} else {
-					props.remove(mapEntryMsg.getKey());
 				}
-			} else if (mapEntryMsg.getCtxType() == ContextUpdateEntryCommandMessage.SERVICE_CONTEXT) {
-				Map props = updater.getServiceProps(comMsg.getParentId(), comMsg.getContextId());
-				if (mapEntryMsg.getOperation() == ContextUpdateEntryCommandMessage.ADD_OR_UPDATE_ENTRY) {
-					props.put(mapEntryMsg.getKey(), mapEntryMsg.getValue());
-				} else {
-					props.remove(mapEntryMsg.getKey());
+
+			} else if (comMsg.getCommandType() == CommandType.UPDATE_STATE_MAP_ENTRY) {
+
+				ContextUpdateEntryCommandMessage mapEntryMsg = (ContextUpdateEntryCommandMessage) comMsg;
+				if (mapEntryMsg.getCtxType() == ContextUpdateEntryCommandMessage.SERVICE_GROUP_CONTEXT) {
+					Map props = updater.getServiceGroupProps(comMsg.getContextId());
+					if (mapEntryMsg.getOperation() == ContextUpdateEntryCommandMessage.ADD_OR_UPDATE_ENTRY) {
+						props.put(mapEntryMsg.getKey(), mapEntryMsg.getValue());
+					} else {
+						props.remove(mapEntryMsg.getKey());
+					}
+				} else if (mapEntryMsg.getCtxType() == ContextUpdateEntryCommandMessage.SERVICE_CONTEXT) {
+					Map props = updater
+							.getServiceProps(comMsg.getParentId(), comMsg.getContextId());
+					if (mapEntryMsg.getOperation() == ContextUpdateEntryCommandMessage.ADD_OR_UPDATE_ENTRY) {
+						props.put(mapEntryMsg.getKey(), mapEntryMsg.getValue());
+					} else {
+						props.remove(mapEntryMsg.getKey());
+					}
 				}
+			} else {
+				log.error("TribesClusterManager received an unknown Context Command");
 			}
+		}
+		
+		if (msg instanceof ConfigurationCommand) {
+
+			ConfigurationCommand command = (ConfigurationCommand) msg;
+			System.out.println("CmdType:" + command.getCommandType());
+			if (command.getCommandType() == CommandType.LOAD_SERVICE_GROUP) {
+				
+				ConfigurationEvent event = new ConfigurationEvent();
+				event.setConfigurationName(command.getSgcName());
+				configurationManager.notifyListeners(command.getCommandType(), event);
+			} else if (command.getCommandType() == CommandType.UNLOAD_SERVICE_GROUP) {
+				
+				ConfigurationEvent event = new ConfigurationEvent ();
+				event.setConfigurationName(command.getSgcName());
+				configurationManager.notifyListeners(command.getCommandType(), event);
+			} else if (command.getCommandType() == CommandType.APPLY_POLICY) {
+				
+				ConfigurationEvent event = new ConfigurationEvent ();
+				event.setConfigurationName(command.getSgcName());
+				event.setPolicyId(command.getPolicyId());
+				configurationManager.notifyListeners(command.getCommandType(), event);
+			} else if (command.getCommandType() == CommandType.PREPARE) {
+				
+				ConfigurationEvent event = new ConfigurationEvent ();
+				event.setConfigurationName(command.getSgcName());
+				configurationManager.notifyListeners(command.getCommandType(), event);
+			} else if (command.getCommandType() == CommandType.COMMIT) {
+				
+				ConfigurationEvent event = new ConfigurationEvent ();
+				configurationManager.notifyListeners(command.getCommandType(), event);
+			} else if (command.getCommandType() == CommandType.ROLLBACK) {
+				
+				ConfigurationEvent event = new ConfigurationEvent ();
+				configurationManager.notifyListeners(command.getCommandType(), event);
+			} else if (command.getCommandType() == CommandType.RELOAD_CONFIGURATION) {
+				
+				ConfigurationEvent event = new ConfigurationEvent ();
+				configurationManager.notifyListeners(command.getCommandType(), event);
+			} else {
+				log.error("TribesClusterManager received an unknown Configuration Command");
+			}
+
 		}
 	}
 	

Modified: webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/TribesClusterManager.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/TribesClusterManager.java?view=diff&rev=518489&r1=518488&r2=518489
==============================================================================
--- webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/TribesClusterManager.java (original)
+++ webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/TribesClusterManager.java Wed Mar 14 22:35:57 2007
@@ -66,7 +66,7 @@
 		contextManager.setConfigContext(context);
 		
 		ChannelSender sender = new ChannelSender ();
-		ChannelListener listener = new ChannelListener ();
+		ChannelListener listener = new ChannelListener (configurationManager, contextManager);
 
 		TransientTribesChannelInfo channelInfo = new TransientTribesChannelInfo();
 		TransientTribesMemberInfo memberInfo = new TransientTribesMemberInfo();

Modified: webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/configuration/ConfigurationCommand.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/configuration/ConfigurationCommand.java?view=diff&rev=518489&r1=518488&r2=518489
==============================================================================
--- webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/configuration/ConfigurationCommand.java (original)
+++ webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/configuration/ConfigurationCommand.java Wed Mar 14 22:35:57 2007
@@ -20,30 +20,21 @@
 
 public class ConfigurationCommand extends CommandMessage {
 	
-	int commandType;
-	String policy;
+	String policyId;
 	String sgcName;
 	
 	public ConfigurationCommand (int commandType) {
 		super (commandType);
 	}
 	
-	public int getCommandType() {
-		return commandType;
+	public String getPolicyId() {
+		return policyId;
 	}
-	
-	public void setCommandType(int commandType) {
-		this.commandType = commandType;
-	}
-	
-	public String getPolicy() {
-		return policy;
+
+	public void setPolicyId(String policyId) {
+		this.policyId = policyId;
 	}
-	
-	public void setPolicy(String policy) {
-		this.policy = policy;
-	}
-	
+
 	public String getSgcName() {
 		return sgcName;
 	}

Modified: webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/configuration/TribesConfigurationManager.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/configuration/TribesConfigurationManager.java?view=diff&rev=518489&r1=518488&r2=518489
==============================================================================
--- webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/configuration/TribesConfigurationManager.java (original)
+++ webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/configuration/TribesConfigurationManager.java Wed Mar 14 22:35:57 2007
@@ -17,8 +17,10 @@
 package org.apache.axis2.cluster.tribes.configuration;
 
 import java.util.ArrayList;
+import java.util.Iterator;
 
 import org.apache.axis2.cluster.ClusteringFault;
+import org.apache.axis2.cluster.configuration.ConfigurationEvent;
 import org.apache.axis2.cluster.configuration.ConfigurationManager;
 import org.apache.axis2.cluster.configuration.ConfigurationManagerListener;
 import org.apache.axis2.cluster.tribes.ChannelSender;
@@ -40,7 +42,10 @@
 	}
 
 	public void applyPolicy(String serviceGroupName, Policy policy)  throws ClusteringFault {
-		throw new UnsupportedOperationException ();
+		ConfigurationCommand command = new ConfigurationCommand (CommandType.APPLY_POLICY);
+		command.setSgcName(serviceGroupName);
+		command.setPolicyId(policy.getId());
+		send (command);
 	}
 
 	public void commit()  throws ClusteringFault {
@@ -82,4 +87,28 @@
 	public void setSender(ChannelSender sender) {
 		this.sender = sender;
 	}
+	
+	public void notifyListeners (int command, ConfigurationEvent event) {
+		
+		for (Iterator it=listeners.iterator();it.hasNext();) {
+			ConfigurationManagerListener listener = (ConfigurationManagerListener) it.next();
+			
+			if (CommandType.LOAD_SERVICE_GROUP==command) 
+				listener.serviceGroupLoaded(event);
+			else if (CommandType.UNLOAD_SERVICE_GROUP==command)
+				listener.serviceGroupUnloaded(event);
+			else if (CommandType.APPLY_POLICY==command)
+				listener.policyApplied(event);
+			else if (CommandType.RELOAD_CONFIGURATION==command)
+				listener.configurationReloaded(event);
+			else if (CommandType.PREPARE==command)
+				listener.prepareCalled(event);
+			else if (CommandType.COMMIT==command)
+				listener.commitCalled(event);
+			else if (CommandType.ROLLBACK==command)
+				listener.rollbackCalled(event);
+		}
+		
+	}
+	
 }

Modified: webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/context/ContextCommandMessage.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/context/ContextCommandMessage.java?view=diff&rev=518489&r1=518488&r2=518489
==============================================================================
--- webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/context/ContextCommandMessage.java (original)
+++ webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/context/ContextCommandMessage.java Wed Mar 14 22:35:57 2007
@@ -21,11 +21,8 @@
 public class ContextCommandMessage extends CommandMessage {
 
 	private String parentId;
-
 	private String contextId;
-
 	private String axisDescriptionName;
-
 	private int contextType;
 
 	public ContextCommandMessage(int commandType, String parentId, String contextId,

Modified: webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/context/TribesContextManager.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/context/TribesContextManager.java?view=diff&rev=518489&r1=518488&r2=518489
==============================================================================
--- webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/context/TribesContextManager.java (original)
+++ webservices/axis2/trunk/java/modules/clustering/src/org/apache/axis2/cluster/tribes/context/TribesContextManager.java Wed Mar 14 22:35:57 2007
@@ -16,7 +16,6 @@
 
 package org.apache.axis2.cluster.tribes.context;
 
-import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Iterator;
@@ -27,7 +26,7 @@
 import org.apache.axis2.cluster.context.ContextEvent;
 import org.apache.axis2.cluster.context.ContextManager;
 import org.apache.axis2.cluster.context.ContextManagerListener;
-import org.apache.axis2.cluster.handlers.ReplicationHandler;
+import org.apache.axis2.cluster.listeners.DefaultContextManagerListener;
 import org.apache.axis2.cluster.tribes.ChannelSender;
 import org.apache.axis2.cluster.tribes.CommandType;
 import org.apache.axis2.context.AbstractContext;
@@ -36,9 +35,6 @@
 import org.apache.axis2.context.ServiceGroupContext;
 import org.apache.axis2.description.AxisService;
 import org.apache.axis2.description.AxisServiceGroup;
-import org.apache.catalina.tribes.Channel;
-import org.apache.catalina.tribes.ChannelException;
-import org.apache.catalina.tribes.Member;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
@@ -271,7 +267,7 @@
 		
 		//updating the listeners
 		for (Iterator it = listeners.iterator();it.hasNext();) {
-			TribesContextManagerListener listener = (TribesContextManagerListener) it.next();
+			DefaultContextManagerListener listener = (DefaultContextManagerListener) it.next();
 			listener.setUpdater(updater);
 		}
 	}

Modified: webservices/axis2/trunk/java/modules/clustering/test/org/apache/axis2/clustering/ClusterManagerTestCase.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/clustering/test/org/apache/axis2/clustering/ClusterManagerTestCase.java?view=diff&rev=518489&r1=518488&r2=518489
==============================================================================
--- webservices/axis2/trunk/java/modules/clustering/test/org/apache/axis2/clustering/ClusterManagerTestCase.java (original)
+++ webservices/axis2/trunk/java/modules/clustering/test/org/apache/axis2/clustering/ClusterManagerTestCase.java Wed Mar 14 22:35:57 2007
@@ -20,46 +20,39 @@
 
 import org.apache.axis2.cluster.ClusterManager;
 import org.apache.axis2.cluster.ClusteringFault;
-import org.apache.axis2.cluster.tribes.context.TribesContextManager;
-import org.apache.axis2.cluster.tribes.context.TribesContextManagerListener;
+import org.apache.axis2.cluster.configuration.ConfigurationManagerListener;
+import org.apache.axis2.cluster.context.ContextManagerListener;
+import org.apache.axis2.cluster.listeners.DefaultContextManagerListener;
+import org.apache.axis2.clustering.configuration.TestConfigurationManagerListener;
 import org.apache.axis2.context.ConfigurationContext;
 import org.apache.axis2.context.ConfigurationContextFactory;
 import org.apache.axis2.description.AxisService;
 import org.apache.axis2.description.AxisServiceGroup;
 import org.apache.axis2.engine.AxisConfiguration;
-import org.apache.axis2.engine.AxisEngine;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
 public abstract class ClusterManagerTestCase extends TestCase {
 
 	protected ClusterManager clusterManager1 = null;
-
 	protected ClusterManager clusterManager2 = null;
-
 	protected AxisConfiguration axisConfiguration1 = null;
-
 	protected AxisConfiguration axisConfiguration2 = null;
-
 	protected ConfigurationContext configurationContext1 = null;
-
 	protected ConfigurationContext configurationContext2 = null;
-
 	protected AxisServiceGroup serviceGroup1 = null;
-
 	protected AxisServiceGroup serviceGroup2 = null;
-
 	protected AxisService service1 = null;
-
 	protected AxisService service2 = null;
-
 	protected String serviceName = "testService";
-
 	protected abstract ClusterManager getClusterManager();
-	
 	protected boolean skipChannelTests = false; 
-
-    private static final Log log = LogFactory.getLog(ClusterManagerTestCase.class);
+	protected TestConfigurationManagerListener configurationManagerListener1 = null;
+	protected TestConfigurationManagerListener configurationManagerListener2 = null;
+	protected DefaultContextManagerListener contextManagerListener1 = null;
+	protected DefaultContextManagerListener contextManagerListener2 = null;
+	
+	private static final Log log = LogFactory.getLog(ClusterManagerTestCase.class);
     
 	protected void setUp() throws Exception {
 
@@ -69,10 +62,16 @@
 		configurationContext1 = ConfigurationContextFactory.createDefaultConfigurationContext();
 		configurationContext2 = ConfigurationContextFactory.createDefaultConfigurationContext();
 
-		TribesContextManagerListener listener1 = new TribesContextManagerListener (configurationContext1);
-		clusterManager1.getContextManager(). addContextManagerListener (listener1);
-		TribesContextManagerListener listener2 = new TribesContextManagerListener (configurationContext2);
-		clusterManager2.getContextManager(). addContextManagerListener (listener2);	
+		contextManagerListener1 = new DefaultContextManagerListener (configurationContext1);
+		clusterManager1.getContextManager(). addContextManagerListener (contextManagerListener1);
+		contextManagerListener2 = new DefaultContextManagerListener (configurationContext2);
+		clusterManager2.getContextManager(). addContextManagerListener (contextManagerListener2);	
+
+		configurationManagerListener1 = new TestConfigurationManagerListener ();
+		clusterManager1.getConfigurationManager().addConfigurationManagerListener(configurationManagerListener1);
+		configurationManagerListener2 = new TestConfigurationManagerListener ();
+		clusterManager2.getConfigurationManager().addConfigurationManagerListener(configurationManagerListener2);
+
 		
 		//giving both Nodes the same deployment configuration
 

Modified: webservices/axis2/trunk/java/modules/clustering/test/org/apache/axis2/clustering/ManageContextTestCase.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/clustering/test/org/apache/axis2/clustering/ManageContextTestCase.java?view=diff&rev=518489&r1=518488&r2=518489
==============================================================================
--- webservices/axis2/trunk/java/modules/clustering/test/org/apache/axis2/clustering/ManageContextTestCase.java (original)
+++ webservices/axis2/trunk/java/modules/clustering/test/org/apache/axis2/clustering/ManageContextTestCase.java Wed Mar 14 22:35:57 2007
@@ -18,6 +18,11 @@
 import java.util.Iterator;
 
 import org.apache.axiom.om.util.UUIDGenerator;
+import org.apache.axis2.cluster.configuration.ConfigurationManagerListener;
+import org.apache.axis2.cluster.context.ContextManagerListener;
+import org.apache.axis2.cluster.listeners.DefaultContextManagerListener;
+import org.apache.axis2.clustering.configuration.TestConfigurationManagerListener;
+import org.apache.axis2.context.ConfigurationContext;
 import org.apache.axis2.context.ContextFactory;
 import org.apache.axis2.context.ServiceContext;
 import org.apache.axis2.context.ServiceGroupContext;
@@ -73,6 +78,5 @@
 			return;
 		}
 	}
-	
 	
 }

Modified: webservices/axis2/trunk/java/modules/clustering/test/org/apache/axis2/clustering/UpdateStateTestCase.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/clustering/test/org/apache/axis2/clustering/UpdateStateTestCase.java?view=diff&rev=518489&r1=518488&r2=518489
==============================================================================
--- webservices/axis2/trunk/java/modules/clustering/test/org/apache/axis2/clustering/UpdateStateTestCase.java (original)
+++ webservices/axis2/trunk/java/modules/clustering/test/org/apache/axis2/clustering/UpdateStateTestCase.java Wed Mar 14 22:35:57 2007
@@ -19,6 +19,11 @@
 import java.util.Iterator;
 
 import org.apache.axiom.om.util.UUIDGenerator;
+import org.apache.axis2.cluster.configuration.ConfigurationManagerListener;
+import org.apache.axis2.cluster.context.ContextManagerListener;
+import org.apache.axis2.cluster.listeners.DefaultContextManagerListener;
+import org.apache.axis2.clustering.configuration.TestConfigurationManagerListener;
+import org.apache.axis2.context.ConfigurationContext;
 import org.apache.axis2.context.ContextFactory;
 import org.apache.axis2.context.ServiceContext;
 import org.apache.axis2.context.ServiceGroupContext;

Added: webservices/axis2/trunk/java/modules/clustering/test/org/apache/axis2/clustering/configuration/ConfigurationManagerTestCase.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/clustering/test/org/apache/axis2/clustering/configuration/ConfigurationManagerTestCase.java?view=auto&rev=518489
==============================================================================
--- webservices/axis2/trunk/java/modules/clustering/test/org/apache/axis2/clustering/configuration/ConfigurationManagerTestCase.java (added)
+++ webservices/axis2/trunk/java/modules/clustering/test/org/apache/axis2/clustering/configuration/ConfigurationManagerTestCase.java Wed Mar 14 22:35:57 2007
@@ -0,0 +1,159 @@
+/*
+ * 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.apache.axis2.clustering.configuration;
+
+import org.apache.axis2.cluster.ClusteringFault;
+import org.apache.axis2.cluster.configuration.ConfigurationEvent;
+import org.apache.axis2.clustering.ClusterManagerTestCase;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.neethi.Policy;
+
+
+public abstract class ConfigurationManagerTestCase extends ClusterManagerTestCase {
+
+    private static final Log log = LogFactory.getLog(ConfigurationManagerTestCase.class);
+    
+    public void testLoadServiceGroup () throws ClusteringFault {
+       	configurationManagerListener2.clearEventList();
+       	
+    	String serviceGroupName = "testService";
+    	clusterManager1.getConfigurationManager().loadServiceGroup(serviceGroupName);
+    	
+    	try {
+			Thread.sleep(3000);
+		} catch (InterruptedException e) {
+			e.printStackTrace();
+		}
+    	
+		ConfigurationEvent event = (ConfigurationEvent) configurationManagerListener2.getEventList().get(0);
+		assertNotNull(event);
+		assertEquals(event.getConfigurationName(), serviceGroupName);
+    }
+    
+    public void testUnloadServiceGroup ()  throws ClusteringFault {
+    	
+    	configurationManagerListener2.clearEventList();
+    	
+    	String serviceGroupName = "testService";
+    	clusterManager1.getConfigurationManager().unloadServiceGroup (serviceGroupName);
+    	
+    	try {
+			Thread.sleep(3000);
+		} catch (InterruptedException e) {
+			e.printStackTrace();
+		}
+    	
+		ConfigurationEvent event = (ConfigurationEvent) configurationManagerListener2.getEventList().get(0);
+		assertNotNull(event);
+		assertEquals(event.getConfigurationName(), serviceGroupName);
+    }
+    
+    public void testApplyPolicy () throws ClusteringFault {
+    	
+    	configurationManagerListener2.clearEventList();
+    	
+    	String serviceGroupName = "testService";
+    	String policyID = "policy1";
+    	
+    	Policy policy = new Policy ();
+    	policy.setId(policyID);
+    	
+    	clusterManager1.getConfigurationManager().applyPolicy (serviceGroupName,policy);
+    	
+    	try {
+			Thread.sleep(3000);
+		} catch (InterruptedException e) {
+			e.printStackTrace();
+		}
+    	
+		ConfigurationEvent event = (ConfigurationEvent) configurationManagerListener2.getEventList().get(0);
+		assertNotNull(event);
+		assertEquals(event.getConfigurationName(), serviceGroupName);
+		assertEquals(event.getPolicyId(), policyID);
+		
+    }
+    
+    public void testPrepare ()  throws ClusteringFault {
+    	
+    	configurationManagerListener2.clearEventList();
+    	
+    	String serviceGroupName = "testService";
+    	clusterManager1.getConfigurationManager().prepare();
+    	
+    	try {
+			Thread.sleep(3000);
+		} catch (InterruptedException e) {
+			e.printStackTrace();
+		}
+    	
+		ConfigurationEvent event = (ConfigurationEvent) configurationManagerListener2.getEventList().get(0);
+		assertNotNull(event);
+    }
+    
+    public void testCommit ()  throws ClusteringFault {
+    	
+    	configurationManagerListener2.clearEventList();
+    	
+    	String serviceGroupName = "testService";
+    	clusterManager1.getConfigurationManager().commit();
+    	
+    	try {
+			Thread.sleep(3000);
+		} catch (InterruptedException e) {
+			e.printStackTrace();
+		}
+    	
+		ConfigurationEvent event = (ConfigurationEvent) configurationManagerListener2.getEventList().get(0);
+		assertNotNull(event);
+    }
+    
+    public void testRollback () throws ClusteringFault {
+    	
+    	configurationManagerListener2.clearEventList();
+    	
+    	String serviceGroupName = "testService";
+    	clusterManager1.getConfigurationManager().rollback();
+    	
+    	try {
+			Thread.sleep(3000);
+		} catch (InterruptedException e) {
+			e.printStackTrace();
+		}
+    	
+		ConfigurationEvent event = (ConfigurationEvent) configurationManagerListener2.getEventList().get(0);
+		assertNotNull(event);
+    }
+	
+    public void testReloadConfiguration () throws ClusteringFault {
+    	
+    	configurationManagerListener2.clearEventList();
+    	
+    	String serviceGroupName = "testService";
+    	clusterManager1.getConfigurationManager().reloadConfiguration();
+    	
+    	try {
+			Thread.sleep(3000);
+		} catch (InterruptedException e) {
+			e.printStackTrace();
+		}
+    	
+		ConfigurationEvent event = (ConfigurationEvent) configurationManagerListener2.getEventList().get(0);
+		assertNotNull(event);
+    }
+    
+}

Added: webservices/axis2/trunk/java/modules/clustering/test/org/apache/axis2/clustering/configuration/TestConfigurationManagerListener.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/clustering/test/org/apache/axis2/clustering/configuration/TestConfigurationManagerListener.java?view=auto&rev=518489
==============================================================================
--- webservices/axis2/trunk/java/modules/clustering/test/org/apache/axis2/clustering/configuration/TestConfigurationManagerListener.java (added)
+++ webservices/axis2/trunk/java/modules/clustering/test/org/apache/axis2/clustering/configuration/TestConfigurationManagerListener.java Wed Mar 14 22:35:57 2007
@@ -0,0 +1,67 @@
+/*
+ * 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.apache.axis2.clustering.configuration;
+
+import java.util.ArrayList;
+import org.apache.axis2.cluster.configuration.ConfigurationEvent;
+import org.apache.axis2.cluster.configuration.ConfigurationManagerListener;
+
+public class TestConfigurationManagerListener implements ConfigurationManagerListener {
+
+	ArrayList eventList = null;
+	
+	public TestConfigurationManagerListener () {
+		eventList = new ArrayList ();
+	}
+	
+	public void clearEventList () {
+		eventList.clear();
+	}
+	
+	public ArrayList getEventList() {
+		return eventList;
+	}
+
+	public void commitCalled(ConfigurationEvent event) {
+		eventList.add(event);
+	}
+
+	public void configurationReloaded(ConfigurationEvent event) {
+		eventList.add(event);
+	}
+
+	public void policyApplied(ConfigurationEvent event) {
+		eventList.add(event);
+	}
+
+	public void prepareCalled(ConfigurationEvent event) {
+		eventList.add(event);
+	}
+
+	public void rollbackCalled(ConfigurationEvent event) {
+		eventList.add(event);
+	}
+
+	public void serviceGroupLoaded(ConfigurationEvent event) {
+		eventList.add(event);
+	}
+
+	public void serviceGroupUnloaded(ConfigurationEvent event) {
+		eventList.add(event);
+	}
+
+}

Added: webservices/axis2/trunk/java/modules/clustering/test/org/apache/axis2/clustering/tribes/ConfigurationManagerTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/clustering/test/org/apache/axis2/clustering/tribes/ConfigurationManagerTest.java?view=auto&rev=518489
==============================================================================
--- webservices/axis2/trunk/java/modules/clustering/test/org/apache/axis2/clustering/tribes/ConfigurationManagerTest.java (added)
+++ webservices/axis2/trunk/java/modules/clustering/test/org/apache/axis2/clustering/tribes/ConfigurationManagerTest.java Wed Mar 14 22:35:57 2007
@@ -0,0 +1,29 @@
+/*
+ * 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.apache.axis2.clustering.tribes;
+
+import org.apache.axis2.cluster.ClusterManager;
+import org.apache.axis2.cluster.tribes.TribesClusterManager;
+
+public class ConfigurationManagerTest extends
+		org.apache.axis2.clustering.configuration.ConfigurationManagerTestCase {
+
+	protected ClusterManager getClusterManager() {
+		return new TribesClusterManager ();
+	}
+
+}

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/cluster/configuration/ConfigurationEvent.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/cluster/configuration/ConfigurationEvent.java?view=diff&rev=518489&r1=518488&r2=518489
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/cluster/configuration/ConfigurationEvent.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/cluster/configuration/ConfigurationEvent.java Wed Mar 14 22:35:57 2007
@@ -17,9 +17,42 @@
 package org.apache.axis2.cluster.configuration;
 
 public class ConfigurationEvent {
-	String descriptionName;
-	String parentDescriptionName;
-	int descriptionType;
+
+	String configurationName;
+	String parentConfigurationName;
+	int configurationType;
+	String policyId = null;
 	
+	public String getConfigurationName() {
+		return configurationName;
+	}
+
+	public void setConfigurationName(String configurationName) {
+		this.configurationName = configurationName;
+	}
+
+	public int getConfigurationType() {
+		return configurationType;
+	}
+
+	public void setConfigurationType(int configurationType) {
+		this.configurationType = configurationType;
+	}
+
+	public String getParentConfigurationName() {
+		return parentConfigurationName;
+	}
+
+	public void setParentConfigurationName(String parentConfigurationName) {
+		this.parentConfigurationName = parentConfigurationName;
+	}
+
+	public String getPolicyId() {
+		return policyId;
+	}
+
+	public void setPolicyId(String policyId) {
+		this.policyId = policyId;
+	}
 	
 }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AxisEngine.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AxisEngine.java?view=diff&rev=518489&r1=518488&r2=518489
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AxisEngine.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AxisEngine.java Wed Mar 14 22:35:57 2007
@@ -271,32 +271,15 @@
         return pi;
     }
 
-    private void flowComplete(MessageContext msgContext, boolean inbound) throws AxisFault {
+    private void flowComplete(MessageContext msgContext, boolean inbound) {
         Iterator invokedPhaseIterator = inbound ? msgContext.getInboundExecutedPhases() :
                 msgContext.getOutboundExecutedPhases();
 
-        Handler currentHandler;
-        
-        //Even if an exception get thrown in the middle, we should continue to call flowComplete of all the Handlers.
-        //The first exception that was caught will be thrown out, others will be logged here.
-        AxisFault firstException = null;
         while (invokedPhaseIterator.hasNext()) {
-            currentHandler = ((Handler) invokedPhaseIterator.next());
-            
-            try {
-            	currentHandler.flowComplete(msgContext);
-            } catch (AxisFault e) {
-            	if (firstException==null)
-            		firstException = e;
-            	else {
-            		log.error(e);
-            	}
-            }
+            Handler currentHandler = ((Handler) invokedPhaseIterator.next());
+            currentHandler.flowComplete(msgContext);
         }
 
-        if (firstException!=null) 
-        	throw firstException;
-        
         /*This is needed because the OutInAxisOperation currently invokes
         * receive() even when a fault occurs, and we will have already executed
         * the flowComplete on those before receiveFault() is called.

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/Handler.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/Handler.java?view=diff&rev=518489&r1=518488&r2=518489
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/Handler.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/Handler.java Wed Mar 14 22:35:57 2007
@@ -73,7 +73,7 @@
      * @param msgContext the <code>MessageContext</code> to process with this
      *                   <code>Handler</code>.
      */
-    public void flowComplete(MessageContext msgContext) throws AxisFault;
+    public void flowComplete(MessageContext msgContext);
 
     /**
      * Gets the HandlerDescription of a handler. This is used as an input to get phaseRule of a handler.

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/Phase.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/Phase.java?view=diff&rev=518489&r1=518488&r2=518489
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/Phase.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/Phase.java Wed Mar 14 22:35:57 2007
@@ -400,7 +400,7 @@
         return pi;
     }
 
-    public void flowComplete(MessageContext msgContext) throws AxisFault {
+    public void flowComplete(MessageContext msgContext) {
         if (LoggingControl.debugLoggingAllowed && log.isDebugEnabled()) {
             log.debug(msgContext.getLogIDString() + " Invoking flowComplete() in Phase \"" +
                     phaseName + "\"");

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/handlers/AbstractHandler.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/handlers/AbstractHandler.java?view=diff&rev=518489&r1=518488&r2=518489
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/handlers/AbstractHandler.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/handlers/AbstractHandler.java Wed Mar 14 22:35:57 2007
@@ -103,6 +103,6 @@
         return handlerDesc.getParameter(name);
     }
 
-    public void flowComplete(MessageContext msgContext) throws AxisFault {
+    public void flowComplete(MessageContext msgContext) {
     }
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org