[jboss-svn-commits] JBL Code SVN: r6869 - labs/jbossesb/workspace/eschifman/trunk/product/core/listeners/src/org/jboss/soa/esb/message/listeners
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Tue Oct 17 15:55:05 EDT 2006
Author: estebanschifman
Date: 2006-10-17 15:55:03 -0400 (Tue, 17 Oct 2006)
New Revision: 6869
Modified:
labs/jbossesb/workspace/eschifman/trunk/product/core/listeners/src/org/jboss/soa/esb/message/listeners/ActionProcessingPipeline.java
labs/jbossesb/workspace/eschifman/trunk/product/core/listeners/src/org/jboss/soa/esb/message/listeners/ListenerPropertyNames.java
Log:
Replace constant attribute/element names with ListenerProperties constants
Modified: labs/jbossesb/workspace/eschifman/trunk/product/core/listeners/src/org/jboss/soa/esb/message/listeners/ActionProcessingPipeline.java
===================================================================
--- labs/jbossesb/workspace/eschifman/trunk/product/core/listeners/src/org/jboss/soa/esb/message/listeners/ActionProcessingPipeline.java 2006-10-17 19:42:43 UTC (rev 6868)
+++ labs/jbossesb/workspace/eschifman/trunk/product/core/listeners/src/org/jboss/soa/esb/message/listeners/ActionProcessingPipeline.java 2006-10-17 19:55:03 UTC (rev 6869)
@@ -35,7 +35,7 @@
_config = ActionUtils.getConfigTree(_message);
if (null==_config)
throw new IllegalArgumentException("Configuration needed for action classes");
- _actionList = _config.getChildren("action");
+ _actionList = _config.getChildren(ListenerPropertyNames.ACTION_ELEMENT);
if (null==_actionList || _actionList.length<1)
throw new ConfigurationException("No actions in list");
}
@@ -67,9 +67,11 @@
for(ConfigTree oCurr : _actionList)
{
_currentIndex++;
- _currentAction = oCurr.getAttribute("class");
+ String attrName = ListenerPropertyNames.ACTION_CLASS_ATTRIBUTE;
+ _currentAction = oCurr.getAttribute(attrName);
- String sProcessMethod = obtainAttribute(oCurr,"process","process");
+ attrName = ListenerPropertyNames.ACTION_PROCESS_METHOD;
+ String sProcessMethod = obtainAttribute(oCurr,attrName,attrName);
_currentClass = Class.forName(_currentAction);
Constructor oConst = _currentClass.getConstructor(new Class[] {ConfigTree.class});
@@ -137,7 +139,7 @@
protected void actionClassException(ConfigTree tree, Exception thr)
{
thr.printStackTrace();
- String sMethod = obtainAttribute(tree,"exceptionMethod",null);
+ String sMethod = obtainAttribute(tree,ListenerPropertyNames.ACTION_EXCEPTION_CALLBACK,null);
if (null!=sMethod)
try
{
@@ -156,7 +158,7 @@
*/
protected void actionClassFinishedOk(ConfigTree tree)
{
- String sMethod = obtainAttribute(tree,"okMethod",null);
+ String sMethod = obtainAttribute(tree,ListenerPropertyNames.ACTION_NORMAL_COMPLETION_CALLBACK,null);
if (null!=sMethod)
try
{
@@ -178,7 +180,7 @@
String[] sa = new String[_actionList.length];
int i1=0;
for (ConfigTree oCurr : _actionList)
- sa[i1++]=oCurr.getAttribute("name");
+ sa[i1++]=obtainAttribute(oCurr,ListenerPropertyNames.ACTION_CLASS_ATTRIBUTE,"NO_CLASSNAME");
return sa;
}
Modified: labs/jbossesb/workspace/eschifman/trunk/product/core/listeners/src/org/jboss/soa/esb/message/listeners/ListenerPropertyNames.java
===================================================================
--- labs/jbossesb/workspace/eschifman/trunk/product/core/listeners/src/org/jboss/soa/esb/message/listeners/ListenerPropertyNames.java 2006-10-17 19:42:43 UTC (rev 6868)
+++ labs/jbossesb/workspace/eschifman/trunk/product/core/listeners/src/org/jboss/soa/esb/message/listeners/ListenerPropertyNames.java 2006-10-17 19:55:03 UTC (rev 6869)
@@ -6,4 +6,10 @@
public static final String JNDI_TYPE = "jndi-type";
public static final String JNDI_URL = "jndi-URL";
public static final String MESSAGE_SELECTOR = "message-selector";
+
+ public static final String ACTION_ELEMENT = "action";
+ public static final String ACTION_CLASS_ATTRIBUTE = "class";
+ public static final String ACTION_PROCESS_METHOD = "process";
+ public static final String ACTION_NORMAL_COMPLETION_CALLBACK = "okMethod";
+ public static final String ACTION_EXCEPTION_CALLBACK= "exceptionMethod";
}
More information about the jboss-svn-commits
mailing list