[jboss-svn-commits] JBL Code SVN: r10329 - in labs/jbossesb/trunk/product/core/listeners: tests/src/org/jboss/soa/esb/listeners/message and 1 other directory.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Mon Mar 19 10:10:37 EDT 2007
Author: kevin.conner at jboss.com
Date: 2007-03-19 10:10:37 -0400 (Mon, 19 Mar 2007)
New Revision: 10329
Modified:
labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/message/ActionProcessorMethodInfo.java
labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/message/ActionProcessingPipelineUnitTest.java
Log:
Reverted error/success processing: JBTM-477
Modified: labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/message/ActionProcessorMethodInfo.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/message/ActionProcessorMethodInfo.java 2007-03-19 13:54:37 UTC (rev 10328)
+++ labs/jbossesb/trunk/product/core/listeners/src/org/jboss/soa/esb/listeners/message/ActionProcessorMethodInfo.java 2007-03-19 14:10:37 UTC (rev 10329)
@@ -206,32 +206,15 @@
final String processMethod = actionConfig.getAttribute(ListenerTagNames.PROCESS_METHOD_TAG) ;
if (processMethod == null || ActionPipelineProcessor.PROCESS_METHOD.equals(processMethod))
{
- final ConfigTree[] properties = actionConfig.getChildren(ListenerTagNames.ACTION_PROPERTY_TAG) ;
- final int numProperties = (properties == null ? 0 : properties.length) ;
- if (numProperties > 0)
+ final String successMethod = actionConfig.getAttribute(ListenerTagNames.NORMAL_COMPLETION_METHOD_TAG) ;
+ if (successMethod == null || ActionPipelineProcessor.PROCESS_SUCCESS_METHOD.equals(successMethod))
{
- for(int count = 0 ; count < numProperties ; count++)
+ final String exceptionMethod = actionConfig.getAttribute(ListenerTagNames.EXCEPTION_METHOD_TAG) ;
+ if (exceptionMethod == null || ActionPipelineProcessor.PROCESS_EXCEPTION_METHOD.equals(exceptionMethod))
{
- final ConfigTree property = properties[count] ;
- final String name = property.getAttribute("name") ;
- final String value = property.getAttribute("value") ;
- if (ListenerTagNames.NORMAL_COMPLETION_METHOD_TAG.equals(name))
- {
- if ((value != null) && !ActionPipelineProcessor.PROCESS_SUCCESS_METHOD.equals(value))
- {
- return true ;
- }
- }
- if (ListenerTagNames.EXCEPTION_METHOD_TAG.equals(name))
- {
- if ((value != null) && !ActionPipelineProcessor.PROCESS_EXCEPTION_METHOD.equals(value))
- {
- return true ;
- }
- }
+ return false ;
}
}
- return false ;
}
return true ;
}
@@ -251,10 +234,10 @@
final String processMethodName = actionConfig.getAttribute(ListenerTagNames.PROCESS_METHOD_TAG, ActionPipelineProcessor.PROCESS_METHOD) ;
final Method[] processMethods = getMethods(actionClass, processMethodName, Message.class);
- final String processSuccessName = getPropertyValue(actionConfig, ListenerTagNames.NORMAL_COMPLETION_METHOD_TAG) ;
+ final String processSuccessName = actionConfig.getAttribute(ListenerTagNames.NORMAL_COMPLETION_METHOD_TAG) ;
final Method processSuccess = getMethod(actionClass, processSuccessName, Message.class);
- final String processExceptionName = getPropertyValue(actionConfig, ListenerTagNames.EXCEPTION_METHOD_TAG) ;
+ final String processExceptionName = actionConfig.getAttribute(ListenerTagNames.EXCEPTION_METHOD_TAG) ;
final Method processException = getMethod(actionClass, processExceptionName, Message.class, Throwable.class) ;
return new ActionProcessorMethodInfo(processMethods, processSuccess, processException) ;
@@ -266,31 +249,6 @@
}
/**
- * Get the value of an action property.
- * @param actionConfig The action configuration.
- * @param propertyName The name of the property.
- * @return The value of the property or null.
- */
- private static String getPropertyValue(final ConfigTree actionConfig, final String propertyName)
- {
- final ConfigTree[] properties = actionConfig.getChildren(ListenerTagNames.ACTION_PROPERTY_TAG) ;
- final int numProperties = (properties == null ? 0 : properties.length) ;
- if (numProperties > 0)
- {
- for(int count = 0 ; count < numProperties ; count++)
- {
- final ConfigTree property = properties[count] ;
- final String name = property.getAttribute("name") ;
- if (propertyName.equals(name))
- {
- return property.getAttribute("value") ;
- }
- }
- }
- return null ;
- }
-
- /**
* Get the methods specified by the list.
* @param actionClass The action class
* @param methodNameList The list of method names
Modified: labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/message/ActionProcessingPipelineUnitTest.java
===================================================================
--- labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/message/ActionProcessingPipelineUnitTest.java 2007-03-19 13:54:37 UTC (rev 10328)
+++ labs/jbossesb/trunk/product/core/listeners/tests/src/org/jboss/soa/esb/listeners/message/ActionProcessingPipelineUnitTest.java 2007-03-19 14:10:37 UTC (rev 10329)
@@ -344,21 +344,14 @@
}
if (successOverride != null)
{
- addProperty(actionChild, ListenerTagNames.NORMAL_COMPLETION_METHOD_TAG, successOverride) ;
+ actionChild.setAttribute(ListenerTagNames.NORMAL_COMPLETION_METHOD_TAG, successOverride) ;
}
if (exceptionOverride != null)
{
- addProperty(actionChild, ListenerTagNames.EXCEPTION_METHOD_TAG, exceptionOverride) ;
+ actionChild.setAttribute(ListenerTagNames.EXCEPTION_METHOD_TAG, exceptionOverride) ;
}
}
- private void addProperty(final ConfigTree actionChild, final String name, final String value)
- {
- final ConfigTree property = new ConfigTree(ListenerTagNames.ACTION_PROPERTY_TAG, actionChild) ;
- property.setAttribute("name", name) ;
- property.setAttribute("value", value) ;
- }
-
private void checkOrder(final Integer[] list, int ... values)
{
final int numValues = (values == null ? 0 : values.length) ;
More information about the jboss-svn-commits
mailing list