Apache CXF BusFactory stores a default bus instance in a static member attribute. Unless the createIfNeeded is set to false (default is true), that default bus is used whenever the BusFactory is asked for either the default bus or the thread bus and the current thread is not associated to a bus yet. On server side, that's likely to be a potential problem, as the default bus might end up being one related to a specific deployment.
      The CXF and JBossWS-CXF bus factories already set the default bus only using the BusFactory.possiblySetDefaultBus(Bus b) method, which basically sets the bus only if it's not been set yet. However we currently erase the default bus in multiple locations during the deployment...

      We need to:
      1) never explicitly set/erase the default bus in the jbossws-cxf integration code (deployers, invokers, etc.)
      2) never rely on default bus for the jbossws-cxf integration code (as that might have been changed and after all there's really no reason for falling back to that when the thread def bus should always be set on server side; when on client side, a new bus should simply be created in the integration code)
      3) "eagerly" create/set a proper default bus on server side, avoiding pushing deployment specific stuff in it (ideally at boot time)

        Gliffy Diagrams




              • Assignee:
                asoldano Alessio Soldano
                asoldano Alessio Soldano
              • Votes:
                0 Vote for this issue
                0 Start watching this issue


                • Created: