WSO2 ESB enterprise service bus implementation principle of localization Source Share and

Reprinted from WSO2 ESB enterprise service bus implementation principle of sharing and finished Source
WSO2 ESB is a lightweight easy to use enterprise service bus resources,. WSO2 ESB SOA allows system administrators and architects based Apache Software License v2.0 easily configure message routing, virtualization, mediation, transformation, logging, task scheduling, load balancing, routing failure, event agency, etc. runtime is designed to be completely asynchronous, non-blocking, continuous. Based on Apache Synapse intermediary engine.

    WSO2 ESB版本5.0.0是4.9.0的后继版,它在单个版本中完成了运行时的工具和分析。WSO2 ESB 5.0.0新增并加强了部分功能:通过WSO2 ESB工具提供的工具支持来创建和管理ESB工件;WebSocket支持通过WSO2 ESB WebSocket传输,WSO2 ESB WebSocket入站协议和WSO2 ESB安全WebSocket入站协议;调解调试器,允许通过WSO2 ESB工具调试中介流等等。

Preparations
WSO2 ESB 5.0.0 Reference Document: https://docs.wso2.com/display/ESB500/About+this+Release
download the finished project required java (I write the source code is relatively simple for reference only, this tool Chinese), Source address: https://github.com/yoodb/updjarutils
WSO2 the ESB 5.0.0 Download: http://wso2.com/more-downloads/esb/

Speaking of how to
use Java code to achieve compression and decompression jar, Reference: http://blog.yoodb.com/yoodb/article/detail/1319
wso2esb-5.0.1-SNAPSHOT.zip file after the WSO2 ESB source compiler used in this paper , the decompression compressed onto a local directory, as wso2esb-5.0.1 installation directory.
Run Tests.java class specific code as follows:
Package com.yoodb;

import java.io.File;
import java.io.FileOutputStream;
import java.util.ArrayList;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

public class Tests {

private static Log log = LogFactory.getLog(Tests.class);

/**
 * 
 * @param args
 * @throws Exception
 */
public static void main(String[] args) throws Exception {
    String infoPath = "E:\\files\\";
    String logFilePath = "info.log";
    UpdJarContent.createFile(infoPath, logFilePath);
    FileOutputStream logfile = new FileOutputStream(infoPath + logFilePath);
    String proName ="Resources";
    ArrayList filelist = UpdJarContent.searchJarFiles("E:\\wso2esb-5.0.1-SNAPSHOT\\repository\\components\\plugins");
    for (File file : filelist) {
        UpdJarContent ut = new UpdJarContent();
        SignUtils ss = new SignUtils();
        String path = file.getAbsolutePath();
        ss.setJarPath(path);
        logfile.write(("------" + path + "------").getBytes());
        logfile.write("\r\n".getBytes());
        log.info("需要解压的压缩包路径-->" + path);

        String fileName = file.getName().replace(".jar", "");
        ss.setOriginalUrl(fileName);
        log.info("用于压缩包删除前缀目录的名称-->" + fileName);

        String filePath = infoPath + fileName;
        ss.setFilePath(filePath);
        log.info("解压后的文件夹目录路径-->" + filePath);

        String newFilePath = infoPath + file.getName();
        ss.setJarNewPath(newFilePath);
        log.info("新打包后的压缩包路径-->" + newFilePath);

        ut.updJarContent(ss,logfile,proName);
        logfile.write(("------" + path + "------").getBytes());
        logfile.write("\r\n".getBytes());
        //DeleteDirectory.deleteDir(new File(filePath));
        //log.info("删除临时解压文件 -->" + filePath + "<-- 成功!");
    }
    logfile.close();
}

}
Wherein ... \ repository \ components \ plugins directory is required finished jar package.
jar package name contains .ui. ui_ information and content of the package file Resources.properties file is necessary finished, you can open a simple look.
Note: org.wso2.carbon.ui_4.4.9.jar package is WSO2 ESB front-end frame, the frame and the package is required org.wso2.carbon.i18n_4.4.9.jar finished pack for the jar.
Download java source code on github in E: \ files \ path is the need to compress the file directory and finished finished a jar of store after decompression, as in the other is not too much to explain, do not understand what can be in plain text house message blog site consulting, implementation of the main function to start running the operation finished.
Takes about 1 hour time finished, finished after the success of the jar package totaling more than one hundred, the E: \ Copy all the jar under the package files \ path to replace the original jar package ... \ repository \ components \ plugins directory, then run wso2server .bat can be.

FIG finished part results:
WSO2 the ESB main login screen
OEGD3 (GV91YMNX_) RIK) M7G.png

WSO2 ESB login main interface
4) Q {3NGGYB (I] 0 ~ 6T86LE [L.png

WSO2 ESB supports many application layer protocols and message protocols (collectively referred to as transmission), including HTTP / S, E-mail, Java Message Service (JMS) and Virtual File System (VFS). He also supports domain-specific protocols, such as: Financial Information eXchange (FIX), Advanced Message Queuing Protocol (AMQP) and Health Layer 7 (HL7). The new transmission can be easily inserted into the service, which function is to use a transmission Axis2 framework provides seamless scalability. More About WSO2 ESB Bowen, www.yoodb.com site can search for text in plain home blog, in other content continuously updated.

What problems can leave a message in plain text house blog advice! ! !

Published 35 original articles · won praise 48 · Views 150,000 +

Guess you like

Origin blog.csdn.net/afreon/article/details/75223211
ESB
ESB