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/12 12:24:54 UTC

svn commit: r517179 - in /webservices/axis2/trunk/java/modules: clustering/test/org/apache/axis2/clustering/ kernel/src/org/apache/axis2/cluster/configuration/ kernel/src/org/apache/axis2/cluster/context/ kernel/src/org/apache/axis2/engine/

Author: chamikara
Date: Mon Mar 12 04:24:52 2007
New Revision: 517179

URL: http://svn.apache.org/viewvc?view=rev&rev=517179
Log:
Updated the AxisEngine.flowComplete method to call all the Handlers even if exceptions get thrown.
First exception will be thrown out after invoking all the Handlers, the rest will be logged.

Added Licence to some source files.
Updated Clustering test cases.

Modified:
    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/cluster/configuration/ConfigurationManager.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/cluster/configuration/ConfigurationManagerListener.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/cluster/configuration/ConfigurationType.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/cluster/context/ContextEvent.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/cluster/context/ContextManager.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/cluster/context/ContextManagerListener.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/cluster/context/ContextType.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AxisEngine.java

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=517179&r1=517178&r2=517179
==============================================================================
--- 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 Mon Mar 12 04:24:52 2007
@@ -49,7 +49,12 @@
 
 	public void setUp() throws Exception {
 		super.setUp();
-
+		if (skipChannelTests) {
+			String message = "Cannot run the clustering test setUp.Please make sure that your network service is enabled. Skipping the test...";
+			log.error(message);
+			return;
+		}
+		
 		sgcID = UUIDGenerator.getUUID();
 
 		//Adding contexts to the Node1

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=517179&r1=517178&r2=517179
==============================================================================
--- 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 Mon Mar 12 04:24:52 2007
@@ -1,7 +1,25 @@
+/*
+ * 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.configuration;
 
 public class ConfigurationEvent {
 	String descriptionName;
 	String parentDescriptionName;
 	int descriptionType;
+	
+	
 }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/cluster/configuration/ConfigurationManager.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/cluster/configuration/ConfigurationManager.java?view=diff&rev=517179&r1=517178&r2=517179
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/cluster/configuration/ConfigurationManager.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/cluster/configuration/ConfigurationManager.java Mon Mar 12 04:24:52 2007
@@ -1,3 +1,19 @@
+/*
+ * 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.configuration;
 
 import org.apache.axis2.cluster.ClusteringFault;

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/cluster/configuration/ConfigurationManagerListener.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/cluster/configuration/ConfigurationManagerListener.java?view=diff&rev=517179&r1=517178&r2=517179
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/cluster/configuration/ConfigurationManagerListener.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/cluster/configuration/ConfigurationManagerListener.java Mon Mar 12 04:24:52 2007
@@ -1,3 +1,19 @@
+/*
+ * 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.configuration;
 
 public interface ConfigurationManagerListener {

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/cluster/configuration/ConfigurationType.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/cluster/configuration/ConfigurationType.java?view=diff&rev=517179&r1=517178&r2=517179
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/cluster/configuration/ConfigurationType.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/cluster/configuration/ConfigurationType.java Mon Mar 12 04:24:52 2007
@@ -1,3 +1,19 @@
+/*
+ * 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.configuration;
 
 public class ConfigurationType {

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/cluster/context/ContextEvent.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/cluster/context/ContextEvent.java?view=diff&rev=517179&r1=517178&r2=517179
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/cluster/context/ContextEvent.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/cluster/context/ContextEvent.java Mon Mar 12 04:24:52 2007
@@ -1,3 +1,19 @@
+/*
+ * 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.context;
 
 public class ContextEvent {

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/cluster/context/ContextManager.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/cluster/context/ContextManager.java?view=diff&rev=517179&r1=517178&r2=517179
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/cluster/context/ContextManager.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/cluster/context/ContextManager.java Mon Mar 12 04:24:52 2007
@@ -1,3 +1,19 @@
+/*
+ * 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.context;
 
 import org.apache.axis2.cluster.ClusteringFault;

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/cluster/context/ContextManagerListener.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/cluster/context/ContextManagerListener.java?view=diff&rev=517179&r1=517178&r2=517179
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/cluster/context/ContextManagerListener.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/cluster/context/ContextManagerListener.java Mon Mar 12 04:24:52 2007
@@ -1,3 +1,19 @@
+/*
+ * 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.context;
 
 

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/cluster/context/ContextType.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/cluster/context/ContextType.java?view=diff&rev=517179&r1=517178&r2=517179
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/cluster/context/ContextType.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/cluster/context/ContextType.java Mon Mar 12 04:24:52 2007
@@ -1,3 +1,19 @@
+/*
+ * 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.context;
 
 public class ContextType {

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=517179&r1=517178&r2=517179
==============================================================================
--- 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 Mon Mar 12 04:24:52 2007
@@ -276,11 +276,27 @@
                 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());
-            currentHandler.flowComplete(msgContext);
+            
+            try {
+            	currentHandler.flowComplete(msgContext);
+            } catch (AxisFault e) {
+            	if (firstException==null)
+            		firstException = e;
+            	else {
+            		log.error(e);
+            	}
+            }
         }
 
+        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.



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