0

我正在开发基于 Spring 的独立应用程序,一旦 xml 消息进入系统。我们正在使用 java 代码使用异常和正则表达式进行一些技术验证。现在我正在尝试根据我们需要的数据库中的一些标志插入另一个功能对传入的 xml 消息进行更多验证,但所有现有客户端都不需要。我知道 java 7 中有一个 fork/join 的概念。但我仅限于 java 1.6。那么如何使用 java 1.6 实现类似的功能。

下面是方法。

主类-处理线程-->调用动作类-->每个动作类扩展抽象动作类-->使用xml文件执行技术验证。

public class AbstractAction {

public abstract void  processMsg(String msg);


}


public Class GenericAction extends AbstractAction {


public void processMsg(String str){


// existing code already doing validations

//now i have to check flag in table ,whether that client requires new validations,these validations are in xml file in the form of spring beans.

//Java code read that bean validate using some helper classes.There is no third party code here,Here i want to put some new code.So i have to break down existing into 

//some small piceses




}


}

问候,

柴都哈拉

4

0 回答 0