Alessio Soldano wrote:
Bus mybus = BusFactory.newInstance().createBus();
...
try {
Bus orig = BusFactory.getThreadDefaultBus();
BusFactory.setThreadDefaultBus(mybus);
... client usage ...
} finally {
BusFactory.setThreadDefaultBus(orig);
... evaluate shutting down mybus or storing it somewhere if you don't want to rebuild it...
}
Does this not start becoming CXF specific in this case as opposed to being provider agnostic? Currently, my code is all written using jax-ws (javax.xml.ws.*) api which allows me to use it in either JBoss (CXF) or WebSphere (Axis2) without problems. However, this issue does not surface in websphere (axis2) - only jboss. And I would rather keep it stack independent.
Thanks,
Eric