Q:

classloaders with cxf and jax-ws

in Difference between JAX-WS, Axis2 and CXF
Daniel wrote 

And for the most part, if you start with the in-jdk JAX-WS impl, you can drop in CXF at any time and it would still work.

Can this behave differently with different application/web servers
eg jboss vs tomcat?  
Does it depends on classloaders, how ?
Classloader will load first encountered implementation ?
Won't it lead to conflicts - some classes taken from in-jdk, some
from cxf ?

A:

I suppose that, deducting from your questions, you want to use Apache CXF. In reply to your questions:

For some particular application server, you need to specify some additional configuration. See Application Server Specific Configuration Guide.
Of course. The default behavior is most application server is load classes of the server first, then the classes in the module. Therefore Apache CXF may not work.
Yes. e.g. By default, Glassfish will use Metro for JAX-WS services so the classloader needs to be configured to allow CXF libraries to provide JAX-WS services.
If the classloader is configured properly, there will be no problems.

See also:

Apache Tomcat 6.0 - Classloading
The Class Loader Hierarchy - Oracle GlassFish Server 3.1 Application Development Guide
WebSphere Application Server V7: Understanding Class Loaders
Java Classloader - Wikipedia, the free encyclopedia

