What I meant by default appears to be off a little. The Wiki says that
by default CXF applications pick up their configuration from a file
/cxf.xml that is on the classpath. However, many of the samples use a
configuration file called something.cxf and use the -Dcxf.config.file to
specify the name of the configuration file. It sounds like the reason
for this is avoid any confusion with the other "cxf.xml" files that are
also used to configure CXF.

It sounds like there are a number of configuration files that are used
by CXF to wire itself together. If I were a developer writing a service
with CXF, what is the best way for me to supply my custom configuration
settings? Is it:
To follow what the samples do and add a configuration file using the
command line flag?
To add a cxf.xml file to my class path?
To use the URL method for creating a bus?


> -----Original Message-----
> From: Andrea Smyth [mailto:[EMAIL PROTECTED] 
> Sent: Monday, June 18, 2007 10:44 AM
> To: [email protected]
> Subject: Re: Use of ***.cxf files in the samples
> 
> Johnson, Eric wrote:
> 
> >What is the reason for using .cxf files to hold the configuration 
> >information for the samples instead of just using the 
> default cfx.xml 
> >file? Is this a "Best Practice" for using CXF?
> >
> >  
> >
> Hi Eric,
> 
> What do you mean with the default cxf.xml file - and with 
> 'instead of'?
> If you refer to the META-INF/cxf/cxf.xml shipped in the  
> cxf-rt-core module, this is one of many cfg files that wire 
> together the CXF runtime  - actually its the core cfg file, 
> and you are unlikely to get anywhere without it.
> ADDITIONALLY, demos may use a cfg file containing application 
> specific configuration that overwrites/completes the defaults 
> in the default cxf.xml files and the other default cfg files 
> on the class path (cxf-extension*.xml). This file is mostly 
> called cxf.xml also, but could also be callled 
> "hello-world-secure.xml" or similar to indicate Both files 
> will be (and must be)  used, and there will be no mix up as 
> long as the application speciffic cfg files is not picked up 
> as "META-INF/cxf/cxf.xml" (it isn't, all of the demos pick it 
> up as "cxf.xml").
> If you want to avoid this potential clash, use the URL form 
> of creating a bus (with an absolute file URL).
> For the demos however, picking up the application (or demo) 
> specific cfg file from the classpath works just fine as it's 
> independent of the installation directory (although a 
> relative file URL would do the same).
> 
> Hope that helps,
> Andrea.
> 
> 
> 
> ----------------------------
> IONA Technologies PLC (registered in Ireland) Registered 
> Number: 171387 Registered Address: The IONA Building, 
> Shelbourne Road, Dublin 4, Ireland
> 

Reply via email to