Freeman Fang wrote: > > The problem you see comes from that after you install cxf bc component and > SA, then restart the tomcat, the context listener(which load servicemix > container and then start the intalled cxf bc and sa) always run before the > CXFServlet(which replace the servlet transport), so that the cxf bc has no > chance to use the bus with replaced servlet transport. If you run tomcat > with clean servicemix (remove data and servicemixDB folder in > $TOMCAT_HOME/bin, but add CXFServlet in web.xml), then install sharedLib, > CXF component and your SA, then it works(because in this case the > CXFServlet get initialized first). I will figure out how to resolve the > case. > >> Hi, >> Thanks >> And just one note, generally we append attachment through nabble on > the >> mailling list. >> Freeman >
Hi, did you figure out how to solve this issue ? Meanwhile I digged in the Spring documentation and I think I found a way to work this around. To sum up, the trick is to get the context loaded after the CXFManagedServlet. So I tried to use the alternative to the ContextLoaderListener ie. the ContextLoaderServlet. This involves a slight modification of the web.xml. You have to comment out : <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> and to replace this by the servlet context loader equivalent : <servlet> <servlet-name>context</servlet-name> <servlet-class>org.springframework.web.context.ContextLoaderServlet</servlet-class> <load-on-startup>3</load-on-startup> </servlet> Note that the load-on-startup is greater than the one of the CXFManagedServlet. This seems to work for me, as Tomcat startups now run fine even when all the SA are already deployed. Since I'm not an expert of spring and neither of servicemix, I do not know if this is a viable way to proceed. Any idea on this Freeman ? Thanks in advance for your advice. Kind regards, Benoît PS: please find attached the zip mentioned in my previous post as suggested. http://www.nabble.com/file/p24205542/test_cxf.zip test_cxf.zip -- View this message in context: http://www.nabble.com/Re%3A-Turning-off-Jetty-tp22336288p24205542.html Sent from the ServiceMix - User mailing list archive at Nabble.com.
