> If you notice it doesn't have a line similar to the demo code: > 25/02/2010 6:22:21 PM org.apache.cxf.bus.spring.BusApplicationContext > getConfigResources > INFO: Loaded configuration file etc/spring/client.xml. > >So now I'm trying to find out how/what prints that out.
Lesley, how are creating the Bus instance? Obviously if you use the SpringBusFactory directly, that will over-ride the cxf.config.file system property. The client in the sample I sent you you simply uses the default Bus. Cheers, Eoghan On 25 February 2010 08:34, LTay <[email protected]> wrote: > > Hi Eoghan, > > Finally got the sample code working on my pc. > > I noticed that when I run the sample client code either in my Eclipse as a > Junit App or just from the ant file, the config file passed in by the jvm > arg -Dcxf.config.file=etc/spring/client.xml is definitely read: > > This is the extra output that I can see from running the sample where it's > reading the client.xml config file: > INFO: Refreshing org.apache.cxf.bus.spring.busapplicationcont...@197d257: > display name [org.apache.cxf.bus.spring.busapplicationcont...@197d257]; > startup date [Thu Feb 25 18:22:20 EST 2010]; root of context hierarchy > 25/02/2010 6:22:21 PM org.apache.cxf.bus.spring.BusApplicationContext > getConfigResources > INFO: Loaded configuration file etc/spring/client.xml. > 25/02/2010 6:22:21 PM > org.springframework.beans.factory.support.DefaultListableBeanFactory > registerBeanDefinition > INFO: Overriding bean definition for bean > 'org.apache.cxf.transport.http.policy.HTTPClientAssertionBuilder': > replacing > [Generic bean: class > [org.apache.cxf.transport.http.policy.HTTPClientAssertionBuilder]; > scope=singleton; abstract=false; lazyInit=false; autowireMode=0; > dependencyCheck=0; autowireCandidate=true; primary=false; > factoryBeanName=null; factoryMethodName=null; initMethodName=null; > destroyMethodName=null; defined in URL > > [jar:file:/C:/dev/libraries/cxf/2.2.6/lib/apache-cxf-2.2.6/apache-cxf-2.2.6/lib/cxf-2.2.6.jar!/META-INF/cxf/cxf-extension-http.fixml]] > with [Generic bean: class > [org.apache.cxf.transport.http.policy.HTTPClientAssertionBuilder]; > scope=singleton; abstract=false; lazyInit=false; autowireMode=0; > dependencyCheck=0; autowireCandidate=true; primary=false; > factoryBeanName=null; factoryMethodName=null; initMethodName=null; > destroyMethodName=null; defined in URL > > [jar:file:/C:/dev/libraries/cxf/2.2.6/lib/apache-cxf-2.2.6/apache-cxf-2.2.6/lib/cxf-2.2.6.jar!/META-INF/cxf/cxf-extension-http.fixml]] > > ........ > > 25/02/2010 6:22:21 PM > org.springframework.beans.factory.support.DefaultListableBeanFactory > preInstantiateSingletons > INFO: Pre-instantiating singletons in > > org.springframework.beans.factory.support.defaultlistablebeanfact...@104faf8 > : > defining beans > > [cxf,org.apache.cxf.bus.spring.BusApplicationListener,org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,org.apache.cxf.resource.ResourceManager,org.apache.cxf.configuration.Configurer,org.apache.cxf.binding.BindingFactoryManager,org.apache.cxf.transport.DestinationFactoryManager,org.apache.cxf.transport.ConduitInitiatorManager,org.apache.cxf.wsdl.WSDLManager,org.apache.cxf.phase.PhaseManager,org.apache.cxf.workqueue.WorkQueueManager,org.apache.cxf.buslifecycle.BusLifeCycleManager,org.apache.cxf.endpoint.ServerRegistry,org.apache.cxf.endpoint.ServerLifeCycleManager,org.apache.cxf.endpoint.ClientLifeCycleManager,org.apache.cxf.transports.http.QueryHandlerRegistry,org.apache.cxf.endpoint.EndpointResolverRegistry,org.apache.cxf.headers.HeaderManager,org.apache.cxf.catalog.OASISCatalogManager,org.apache.cxf.endpoint.ServiceContractResolverRegistry,org.apache.cxf.binding.corba.CorbaBindingFactory,org.apache.cxf.binding.corba.wsdl.WSDLExtensionRegister#0,org.apache.cxf.jaxws.context.WebServiceContextResourceResolver,org.apache.cxf.jaxws.context.WebServiceContextImpl,org.apache.cxf.binding.soap.SoapBindingFactory,org.apache.cxf.binding.soap.SoapTransportFactory,org.apache.cxf.binding.soap.customEditorConfigurer,org.apache.cxf.binding.xml.XMLBindingFactory,org.apache.cxf.ws.addressing.policy.AddressingAssertionBuilder,org.apache.cxf.ws.addressing.policy.AddressingPolicyInterceptorProvider,org.apache.cxf.ws.addressing.policy.UsingAddressingAssertionBuilder,org.apache.cxf.javascript.JavascriptQueryHandlerRegistry,org.apache.cxf.transport.local.LocalTransportFactory,org.apache.cxf.transport.http.policy.HTTPClientAssertionBuilder,org.apache.cxf.transport.http.policy.HTTPServerAssertionBuilder,org.apache.cxf.transport.http.policy.NoOpPolicyInterceptorProvider,org.apache.cxf.transport.http.ClientOnlyHTTPTransportFactory,org.apache.cxf.management.InstrumentationManager,org.apache.cxf.transport.http_jetty.JettyHTTPTransportFactory,org.apache.cxf.transport.jms.JMSTransportFactory,org.apache.cxf.binding.object.ObjectBindingFactory,org.apache.cxf.binding.http.HttpBindingFactory,org.apache.cxf.jaxrs.JAXRSBindingFactory,org.apache.cxf.ws.security.policy.WSSecurityPolicyLoader,org.apache.cxf.ws.policy.AssertionBuilderRegistry,org.apache.cxf.ws.policy.PolicyInterceptorProviderRegistry,org.apache.cxf.ws.policy.attachment.external.DomainExpressionBuilderRegistry,org.apache.cxf.ws.policy.attachment.external.EndpointReferenceDomainExpressionBuilder,org.apache.cxf.ws.policy.PolicyBuilder,org.apache.cxf.ws.policy.PolicyEngine,org.apache.cxf.ws.policy.attachment.wsdl11.Wsdl11AttachmentPolicyProvider,org.apache.cxf.ws.policy.attachment.ServiceModelPolicyProvider,org.apache.cxf.ws.policy.mtom.MTOMAssertionBuilder,org.apache.cxf.ws.policy.mtom.MTOMPolicyInterceptorProvider,org.apache.cxf.ws.rm.RMManager,org.apache.cxf.ws.rm.policy.RMPolicyInterceptorProvider,org.apache.cxf.ws.rm.RMAssertionBuilder,Sequential,Random,{ > http://apache.org/hello_world_soap_http}Replica1.jaxws-client.proxyFactory,{http://apache.org/hello_world_soap_http}Replica1.jaxws-client,{http://apache.org/hello_world_soap_http}Replica2.jaxws-client.proxyFactory,{http://apache.org/hello_world_soap_http}Replica2.jaxws-client,{http://apache.org/hello_world_soap_http}Replica3.jaxws-client.proxyFactory,{http://apache.org/hello_world_soap_http}Replica3.jaxws-client<http://apache.org/hello_world_soap_http%7DReplica1.jaxws-client.proxyFactory,%7Bhttp://apache.org/hello_world_soap_http%7DReplica1.jaxws-client,%7Bhttp://apache.org/hello_world_soap_http%7DReplica2.jaxws-client.proxyFactory,%7Bhttp://apache.org/hello_world_soap_http%7DReplica2.jaxws-client,%7Bhttp://apache.org/hello_world_soap_http%7DReplica3.jaxws-client.proxyFactory,%7Bhttp://apache.org/hello_world_soap_http%7DReplica3.jaxws-client> > ]; > root of factory hierarchy > 25/02/2010 6:22:22 PM > org.apache.cxf.service.factory.ReflectionServiceFactoryBean > buildServiceFromWSDL > INFO: Creating Service > {http://apache.org/hello_world_soap_http}ClusteredService<http://apache.org/hello_world_soap_http%7DClusteredService>from > WSDL: > > file:/C:/Temp/apache-cxf-2.1.3-src/distribution/src/main/release/samples/static_failover/wsdl/replicated_hello_world.wsdl > 25/02/2010 6:22:22 PM org.apache.cxf.clustering.FailoverTargetSelector > setStrategy > INFO: Using failover strategy null > > I added this assertion into the sample Client.java conduitSelector > instanceof FailoverTargetSelector to check the conduitSelector type and > that > returns true. However when I remove the jvm arg, the above returns false. > > So then I applied the same jvm arg to my own project's junit test case to > see if this would now work but > this is the only output that I get: > > [INFO] 2010-02-25 18:21:57,866 Refreshing > org.apache.cxf.bus.spring.busapplicationcont...@10e18ba: display name > [org.apache.cxf.bus.spring.busapplicationcont...@10e18ba]; startup date > [Thu > Feb 25 18:21:57 EST 2010]; root of context hierarchy > [INFO] 2010-02-25 18:21:57,976 Loading XML bean definitions from class path > resource [cxf.xml] > [INFO] 2010-02-25 18:21:58,226 Bean factory for application context > [org.apache.cxf.bus.spring.busapplicationcont...@10e18ba]: > org.springframework.beans.factory.support.defaultlistablebeanfact...@a34783 > > And the assertion to check conduitSelector instanceof > FailoverTargetSelector > returns false. > > If you notice it doesn't have a line similar to the demo code: > 25/02/2010 6:22:21 PM org.apache.cxf.bus.spring.BusApplicationContext > getConfigResources > INFO: Loaded configuration file etc/spring/client.xml. > > So now I'm trying to find out how/what prints that out. > > Bit of progress but I'm hoping that once I figure this out, that will be > the > end of it. > > Cheers, > Lesley > -- > View this message in context: > http://old.nabble.com/Failover-config-for-cxf-seems-to-get-ignored-tp27703526p27714372.html > Sent from the cxf-user mailing list archive at Nabble.com. > >
