I don't like this System property name. config.location=repository/conf sounds better. No need to give $CARBON_HOME because the current directory is set to CARBON_HOME. We shouldn't be putting config files into lib.
On Thu, May 24, 2012 at 5:59 PM, Dushan Abeyruwan <dus...@wso2.com> wrote: > Hi > Based on the discussions its agreed to go with the System property > method where at the wso2server.sh will define a new system property > * -Dproperties.hosted.location="$CARBON_HOME/lib"\* > a customziable location where during the property initialization at the > synapse_common (MiscellaneousUtil.java) will first looking to the > externally defined location and if exists the properties will be loading > from the given location rather than looking in to its class path location > (if not it will proceed with the old way like looking in to the classpath > resources) > public static Properties loadProperties(String filePath) { > > InputStream in = null; > > //if we reach to this assume that the we may have to looking to > the customer provided external location for the > * //given properties* > * if (System.getProperty(PROPERTIES_HOSTED_LOCATION) != null) {* > * try {* > * in = new FileInputStream(System.getProperty(PROPERTIES_HOSTED_LOCATION) > + File.separator + filePath);* > * } catch (FileNotFoundException e) {* > * String msg = "Error loading properties from a file at from the System > defined location: " + filePath;* > * log.warn(msg);* > * }* > * }* > > if (in == null) { > in = cl.getResourceAsStream(filePath); > if (log.isDebugEnabled()) { > log.debug("Unable to load file '" + filePath + "'"); > } > > filePath = "conf" + > File.separatorChar + filePath; > if (log.isDebugEnabled()) { > log.debug("Loading a file '" + filePath + "' from > classpath"); > } > > ..... > ..... > > thus chagers will be effected > 1. MiscellaneousUtil.java synapse-commons > 2. > wso2svntrunk/carbon/platform/trunk/build/setup/esb/bin/wso2server.sh > Will initiate separate synapse jira issue for > the changers introduced > > cheers > Dushan > > On Thu, May 24, 2012 at 1:40 PM, Dushan Abeyruwan <dus...@wso2.com> wrote: > >> Hi >> Based on the discussion , >> 1. I just placed all properties to >> CARBON_HOME/repository/conf/tomcat/carbon/WEB-INF/classes (i just create >> classes folder) there , and seems like the property files are not visible >> in the class path, >> 2. As Pradeep told fragment bundle concept just like log4j its and >> its working properly >> 3. define *Dsysnapse.nhtt**p.property.file = .......... i *am not >> sure this if we gonna load properties like this because we may have to do >> some synapse code modification in order to load these property file (but >> synapse is 3rd party lib do we need to change synapse because of this ??? >> but this option i am not a great fan.. >> >> cheers >> Dushan >> >> >> On Tue, May 22, 2012 at 5:15 PM, Afkham Azeez <az...@wso2.com> wrote: >> >>> In previous releases we have been placing all properties files in >>> CARBON_HOME/lib/core/WEB-INF/classes, and they became visible to bundles >>> through the Carbon webapp's WebappClassloader >>> >>> See >>> http://web.archiveorange.com/archive/v/bdAOJ2bORkxfNxgxjKUb >>> >>> On Tue, May 22, 2012 at 2:25 PM, Hiranya Jayathilaka >>> <hira...@wso2.com>wrote: >>> >>>> >>>> >>>> On Tue, May 22, 2012 at 2:01 PM, Pradeep Fernando <prad...@wso2.com>wrote: >>>> >>>>> On Tue, May 22, 2012 at 2:01 PM, Pradeep Fernando <prad...@wso2.com> >>>>> wrote: >>>>> > Hi, >>>>> > >>>>> > On Tue, May 22, 2012 at 1:41 PM, Hiranya Jayathilaka < >>>>> hira...@wso2.com> wrote: >>>>> >> So Synapse looks for the config files in appClassPath. How do we >>>>> include a >>>>> >> config file in appClassPath with the current model? >>>>> > >>>>> > yes, correct. I was just explaining the config file search order >>>>> > convention. Getting configs from appClassPath is not possible with >>>>> > OSGi technology. That is where system property comes in to picture. >>>>> >>>> >>>> May I know how it uses to work in previous releases? >>>> >>>> Thanks, >>>> Hiranya >>>> >>>> >>>>> > >>>>> > thanks, >>>>> > --pradeep >>>>> >>>>> >>>>> >>>>> -- >>>>> Pradeep Fernando >>>>> Senior Software Engineer >>>>> Member, Management Committee - Platform & Cloud Technologies >>>>> WSO2 Inc; http://wso2.com/ >>>>> >>>>> blog: http://pradeepfernando.blogspot.com/ >>>>> m: +94776603662 >>>>> >>>> >>>> >>>> >>>> -- >>>> Hiranya Jayathilaka >>>> Senior Technical Lead; >>>> WSO2 Inc.; http://wso2.org >>>> E-mail: hira...@wso2.com; Mobile: +94 77 633 3491 >>>> Blog: http://techfeast-hiranya.blogspot.com >>>> >>>> _______________________________________________ >>>> Dev mailing list >>>> Dev@wso2.org >>>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>>> >>>> >>> >>> >>> -- >>> *Afkham Azeez* >>> Director of Architecture; WSO2, Inc.; http://wso2.com >>> Member; Apache Software Foundation; http://www.apache.org/ >>> * <http://www.apache.org/>** >>> email: **az...@wso2.com* <az...@wso2.com>* cell: +94 77 3320919 >>> blog: **http://blog.afkham.org* <http://blog.afkham.org>* >>> twitter: **http://twitter.com/afkham_azeez*<http://twitter.com/afkham_azeez> >>> * >>> linked-in: **http://lk.linkedin.com/in/afkhamazeez* >>> * >>> * >>> *Lean . Enterprise . Middleware* >>> >>> >>> _______________________________________________ >>> Dev mailing list >>> Dev@wso2.org >>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>> >>> >> >> >> -- >> Dushan Abeyruwan >> *Senior Software Engineer* >> *Integration Technologies Team* >> *WSO2 Inc. http://wso2.com/* >> *Mobile:(+94)714408632* >> >> > > > -- > Dushan Abeyruwan > *Senior Software Engineer* > *Integration Technologies Team* > *WSO2 Inc. http://wso2.com/* > *Mobile:(+94)714408632* > > -- *Afkham Azeez* Director of Architecture; WSO2, Inc.; http://wso2.com Member; Apache Software Foundation; http://www.apache.org/ * <http://www.apache.org/>** email: **az...@wso2.com* <az...@wso2.com>* cell: +94 77 3320919 blog: **http://blog.afkham.org* <http://blog.afkham.org>* twitter: **http://twitter.com/afkham_azeez*<http://twitter.com/afkham_azeez> * linked-in: **http://lk.linkedin.com/in/afkhamazeez* * * *Lean . Enterprise . Middleware*
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev