JBoss Community

Re: Bizzare host re-write in JAX-WS client on JB7.0.2

created by Eric B in JBoss Web Services - View the full discussion

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

Reply to this message by going to Community

Start a new discussion in JBoss Web Services at Community