Package org.apache.synapse

Examples of org.apache.synapse.ServerConfigurationInformation


    protected void setUpSynapseEnv() {
        System.setProperty("port", "8280");
        System.setProperty("org.apache.xerces.xni.parser.XMLParserConfiguration",
                "org.apache.xerces.parsers.XMLGrammarCachingConfiguration");
        System.setProperty("axis2.xml", "modules/samples/target/test_repos/synapse/conf/axis2.xml");
        ServerConfigurationInformation information = new ServerConfigurationInformation();
        information.setAxis2RepoLocation(SYNAPSE_REPO);
        serverManager = new ServerManager();
        serverManager.init(information, null);
        serverManager.start();
    }
View Full Code Here


public class SynapseCommodityServiceTest extends TestCase {

    protected void setUp() throws java.lang.Exception {

        ServerConfigurationInformation information = new ServerConfigurationInformation();
        information.setCreateNewInstance(false);
        information.setSynapseHome(".");
        // Initializing Synapse repository
        information.setSynapseXMLLocation(
                "./../../repository/conf/sample/resources/misc/synapse.xml");
        information.setAxis2Xml(
                "./../../repository/conf/axis2.xml");

        findAndReplace(
            new File("./../../repository/conf/axis2.xml"),
            new File("./target/test_repos/axis2.xml"),
View Full Code Here

        ServletContext servletContext = servletConfig.getServletContext();
        if (Boolean.TRUE.equals(servletContext.getAttribute(ALREADY_INITED))) {
            return;
        }
        ServerManager serverManager = new ServerManager();
        ServerConfigurationInformation information =
                ServerConfigurationInformationFactory.
                        createServerConfigurationInformation(servletConfig);
        serverManager.init(information, null);
        serverManager.start();
        servletContext.setAttribute(ALREADY_INITED, Boolean.TRUE);
View Full Code Here

    private CountDownLatch cdLatch;
    private Exception processException;

    public SynapseProcessController(SynapseServerConfiguration configuration) {
        this.configuration = configuration;
        information = new ServerConfigurationInformation();
        manager = new ServerManager();
        cdLatch = new CountDownLatch(1);
        serverThread = new ServerThread();
        serverThread.setName(configuration.getServerName() + " thread");
    }
View Full Code Here

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

    public static String getSynapseConfigAbsPath(ServerContextInformation contextInformation) {
        String carbonHome = CarbonUtils.getCarbonHome();
        ServerConfigurationInformation configInfo = getSynapseServerConfigInfo(contextInformation);
        if (configInfo == null) {
            String msg = "Unable to obtain ESB server configuration information";
            log.warn(msg);
            throw new SynapseException(msg);
        }

        File synapseConfigFile = new File(configInfo.getSynapseXMLLocation());
        String synapseConfigPath;
        if (synapseConfigFile.isAbsolute()) {
            synapseConfigPath = synapseConfigFile.getAbsolutePath();
        } else {
            synapseConfigPath = new File(carbonHome.trim(),
                    configInfo.getSynapseXMLLocation()).getAbsolutePath();
        }
        return synapseConfigPath;
    }
View Full Code Here

TOP

Related Classes of org.apache.synapse.ServerConfigurationInformation

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.