Hi , yogen,
First how can you tell the CXF did not pick up the configuration file ?
Can you show me the log for it.
If you read the log to get the information, then please check your class path with these two things:
1. Spring* jars are in your class path.
Because you use the JAXWS API to publish the endpoint , CXF will get a default bus for you, if the default bus is null and you do not include the spring* jars, CXF will use the ExtesionBusFactory instead of the SpringBusFactory to create a bus. Also if the you already set the default bus, CXF will not create a bus for you and use the already set bus.
2. cxf-jetty-config.xml is in the root directory of you class path.
CXF use load the configuration file form class with the spring ClassPathResource class.
ClassPathResource cpr = new ClassPathResource(cfgFile);
BTW.
CXF jetty configuration is base on the port, so if your endpoint publish with other port such as "http://localhost:9002/helloworld";, the configuration you set will not take effect.

Willem.

Yadav, Yogendra (IT) wrote:
Hi,
I am trying to configure the Jetty thread pool. Looked at this page and
started configuring Jetty thread pool.
http://cwiki.apache.org/CXF20DOC/jetty-configuration.html
I created a config file called cxf-jetty-config.xml. Put this in
classpath and started my service with command line arg as
-Dcxf.config.file=cxf-jetty-config.xml. CXF doesn't pick-up this file.
My service is a JAXWS service and I use Endpoint to publish it using a
main() program.
The file looks like this:
  <httpj:engine-factory bus="cxf">
    <httpj:engine port="9000">
      <httpj:threadingParameters minThreads="5" maxThreads="5" />
      <httpj:connector>
        <beans:bean class="org.mortbay.jetty.bio.SocketConnector">
           <beans:property name = "port" value="9000" />
        </beans:bean>
      </httpj:connector>
      <httpj:handlers>
        <beans:bean class="org.mortbay.jetty.handler.DefaultHandler"/>

      </httpj:handlers>
      <httpj:sessionSupport>true</hj:sessionSupport>
    </httpj:engine>
  </httpj:engine-factory>
 </beans>
I tried to rename the file as cxf-extension-xml.xml, it still doesn't pick-up the config. Any help is appreciated.
thanx
-yogen
--------------------------------------------------------

NOTICE: If received in error, please destroy and notify sender. Sender does not 
intend to waive confidentiality or privilege. Use of this email is prohibited 
when received in error.

Reply via email to