Jiang Ning wrote:
Hi Andrea,
In current cxf user defined configuration file name was passed by
System Properity
-Dcxf.config.file=user_defined_configuration
This user defined configuration file name will be treat as
ClassPathResource.
public ConfigurerImpl(String cfgFile) {
if (null == cfgFile) {
cfgFile = System.getProperty(USER_CFG_FILE_PROPERTY_NAME);
}
if (null == cfgFile) {
cfgFile = DEFAULT_USER_CFG_FILE;
}
ClassPathResource cpr = new ClassPathResource(cfgFile);
if (cpr.exists()) {
try {
ApplicationContext ac = new
JaxbClassPathXmlApplicationContext(cfgFile);
setApplicationContext(ac);
} catch (BeansException ex) {
LogUtils.log(LOG, Level.WARNING,
"APP_CONTEXT_CREATION_FAILED_MSG", ex, (Object[])null);
}
} else {
LOG.log(Level.INFO, new
Message("USER_CFG_FILE_NOT_FOUND_MSG", LOG, cfgFile).toString());
}
}
There is an issue about the user defined configuration. If the
user_defined_configuration file name is same as cxf.xml in the classpath
or the user_defined_configuration file not in the classpath. The
user_defined_configuration file would not be loaded rightly.
Hi Willem,
What do you mean with 'same as cxf.xml on the classpath'? The default
user cfg file (cxf.xml) is not the same as META-INF/cxf/cxf.xml.
I don't see a problem as there is no cxf.xml on the classpath unless a
user puts one there.
Andrea.
My suggestion is configurer treats the user_defined_configuration file
as URL like Celtix had done before, to make sure the configuration
file right there.
Any other thought?
Willem.