[prev in list] [next in list] [prev in thread] [next in thread] 

List:       esb-java-dev
Subject:    Re: [esb-java-dev] Using one Synapse installation with
From:       "Hubert, Eric" <eric.hubert () jamba ! net>
Date:       2008-07-26 13:58:11
Message-ID: A9856B86EDA25144A734574D0338C13501098B95 () berwnexmb01 ! jcorp ! ad ! jamba ! net
[Download RAW message or body]

> Hmm, even if this would really work (I'm going to check this, if I
find
> the time), it does not look convenient, or?
> 
> What could we do to support these requirements?

I started reviewing the code and found several places which would cause
problems. Right now what I described would not work at all.

I guess one would need to introduce at least one additional system
property
like ESB_CONFIG_DIR which could point to any location outside the webapp
and esb.home.


Sources which would need to be changed in WSO2-land:

org.wso2.esb.ServiceBus:
PropertyConfigurator.configure("tomcat" + File.separator + "conf" +
            File.separator + "tomcat-log4j.properties");

org.wso2.esb.TomcatServer:
String ksLocation = getTomcatProperty("KeyStore.Location",
"webapp/WEB-INF/classes/conf/identity.jks");

org.wso2.esb.ServiceBusManager:
log4jURL = new URL("file:" + sbc.getEsbHome() + File.separator
                + ServiceBusConstants.ESB_CONF_DIRECTORY +
ServiceBusConstants.LOG4J_PROPS);

org.wso2.esb.ServiceBusConstants:
    public static final String UI_EXTENSIONS_CONFIG_XML =
"conf/ui-extensions-config.xml";
    public static final String HIBERNATE_CFG_XML =
"conf/wso2esb.hibernate.cfg.xml";
public static final String ESB_CONF_DIRECTORY = "webapp" +
File.separator + "WEB-INF" + File.separator + "classes" + File.separator
+ "conf" + File.separator;

org.wso2.esb.ServiceBusConfiguration:
private final static String DEF_LOCATION =
ServiceBusConstants.ESB_CONF_DIRECTORY  + "server.xml";
String path = esbHome + File.separator + DEF_LOCATION;

org.wso2.esb.services.LogAdmin
private String getLogConfigLocation() {
        return ServiceBusConfiguration.getInstance().getEsbHome() +
File.separator
            + ServiceBusConstants.ESB_CONF_DIRECTORY +
ServiceBusConstants.LOG4J_PROPS;
}

Maybe a few others as well...

Sources which would need to be changed in Synapse-land:

I could not identify a single place. The code looks quite flexible,
using either the system properties instead of init parameters or loading
everything from the classpath.

Having a system property like "ESB_CONFIG_DIR" for most cases it would
be sufficient to define only this and saving the need to define
server.xml, synapse.xml, and axis2.xml. If those are specified, the
defaults could be overridden.

What do you think?


Regards,
   Eric

_______________________________________________
Esb-java-dev mailing list
Esb-java-dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/esb-java-dev
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic