简体   繁体   中英

How to disable Apache CXF

I've recently introduced Apache CXF into my web-service handling module to allow me to use some advanced features that it offers.

Unfortunatelly I cannot find any kind of trigger to enable/disable using CXF in runtime. I got dozens of applications reusing parts of that module and I don't want all of them to use CXF in runtime only because its libraries are on the classpath. CXF, as great as it is introduces some bugs or alters the behaviour of the application significantly so I need a way to disable it where its not necessary.

Is there some kind of system property or something I can use so that the CXF libraries are ignored in the runtime?

So far the best way I found to switch between CXF and standard java jax-ws implementation is using appropriate provider, by setting either

Djavax.xml.ws.spi.Provider=org.apache.cxf.jaxws.spi.ProviderImpl

or

Djavax.xml.ws.spi.Provider=com.sun.xml.internal.ws.spi.ProviderImpl

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM