Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-5879

Distinguishing client or service in FactoryBeanListener

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.0.1, 2.7.13
    • Component/s: JAX-WS Runtime
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      The events notification in FactoryBeanListener has restriction in following use case:
      scenario dynamically downloads WS-Policies from custom ServiceRegistry and applies them to the CXF client and service.

      Problem: it seems that there is not reliable way to determine that event ENDPOINT_CREATED was fired by client or by the service in the method:
      protected void handleEventInternal(Event ev, ReflectionServiceFactoryBean factory, Object... args) {
      }
      Other events CLIENT_CREATED, PROXY_CREATED and SERVICE_CREATED help to distinguish client or service, but are fired too late (for example transport is already initialized to this time).

      Proposals:
      Option A: introduce additional optional attribute in ReflectionServiceFactoryBean defining was the factory created by the client or by the service.
      Option B: fire additional events PRE_CLIENT_CREATE, PRE_SERVICE_CREATE before creation of client and service.

      Option B seems to be more consequent and logical.

        Attachments

          Activity

            People

            • Assignee:
              ashakirin Andrei Shakirin
              Reporter:
              ashakirin Andrei Shakirin
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: