Uploaded image for project: 'EJB 3.0'
  1. EJB 3.0
  2. EJBTHREE-1604

Do not create new WebServiceContext when already provided

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Obsolete
    • Icon: Major Major
    • None
    • None
    • None
    • None

      The StatelessContainer's method invokeEndpoint(Method method, Object[] args, InvocationContextCallback invCtxCallback) currently get the WebServiceContext instance using the right jbossws-spi factory. This is an issue with the JBossWS-Metro stack as we should use the WebServiceContext it already provides.
      This should be passed in as an attachment in the InvocationContextCallback.

      Something like this should work:

      ...
      WebServiceContext providedCtx = invCtxCallback.getAttachment(WebServiceContext.class);
      if (providedCtx != null)
      {
      //use the provided one through a delegate
      jaxwsContext = new WebServiceContextDelegate(providedCtx);
      }
      else
      {
      //do as we used to do
      jaxwsContext = contextFactory.newWebServiceContext(InvocationType.JAXWS_EJB3, invCtxCallback.get(javax.xml.ws.handler.MessageContext.class));
      }
      ...

      This requires jbossws-spi 1.0.7 to be released and specified in the dependencies because of the WebServiceContextDelegate.

            rhn-support-asoldano Alessio Soldano
            rhn-support-asoldano Alessio Soldano
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: