glassfish
  1. glassfish
  2. GLASSFISH-10776

InvocationContext.getContextData() is not an instance of javax.xml.ws.handler.MessageContext

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: V3
    • Fix Version/s: V3
    • Component/s: web_services
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      10,776

      Description

      The test verified InvocationContext.getContextData() from an interceptor class
      for a stateless bean with web service end point.

      The log shows the retrieved context data is a java.util.HashMap, not the
      expected javax.xml.ws.handler.MessageContext:

      [#|2009-11-03T15:09:21.059-0500|INFO|glassfish|javax.enterprise.system.tools.deployment.org.glassfish.deployment.common|_ThreadID=24;_ThreadName=Thread-1;|[AutoDeploy]
      Successfully autodeployed :
      /file/v3/glassfish/domains/domain1/autodeploy/HelloClnt.ear.|#]

      [#|2009-11-03T15:09:38.987-0500|INFO|glassfish|null|_ThreadID=26;_ThreadName=Thread-1;|Interceptor
      invoked for method public java.lang.String
      com.sun.ts.tests.ejb30.webservice.interceptor.HelloImpl.sayHello(java.lang.String)|#]

      [#|2009-11-03T15:09:38.988-0500|INFO|glassfish|null|_ThreadID=26;_ThreadName=Thread-1;|InvocationContext.getContextData()
      type: class java.util.HashMap|#]

      [#|2009-11-03T15:09:38.989-0500|INFO|glassfish|null|_ThreadID=26;_ThreadName=Thread-1;|ContextDataMap
      is not an instance of javax.xml.ws.handler.MessageContext |#]

      (ejb30/webservice/interceptor)

        Activity

        Hide
        Bobby Bissett added a comment -

        To have all the info in one place, here is the spec except:

        — begin —
        12.6 InvocationContext

        The InvocationContext object provides metadata that enables interceptor methods to control the
        behavior of the invocation chain. The contextual data is not sharable across separate business method
        invocations or lifecycle callback events. If interceptors are invoked as a result of the invocation on a
        web service endpoint, the map returned by getContextData will be the JAX-WS MessageContext
        [32]. The lifecycle of the InvocationContext instance is otherwise unspecified.
        — end —

        We have a patch that fixes the test and have sent it out for review.

        Show
        Bobby Bissett added a comment - To have all the info in one place, here is the spec except: — begin — 12.6 InvocationContext The InvocationContext object provides metadata that enables interceptor methods to control the behavior of the invocation chain. The contextual data is not sharable across separate business method invocations or lifecycle callback events. If interceptors are invoked as a result of the invocation on a web service endpoint, the map returned by getContextData will be the JAX-WS MessageContext [32] . The lifecycle of the InvocationContext instance is otherwise unspecified. — end — We have a patch that fixes the test and have sent it out for review.
        Hide
        Bobby Bissett added a comment -

        Sending /Users/bobby/work/ws/v3/ejb/ejb-container/src/main/java/com/sun/ejb/EjbInvocation.java
        Sending /Users/bobby/work/ws/v3/ejb/ejb-internal-
        api/src/main/java/org/glassfish/ejb/api/EJBInvocation.java
        Sending /Users/bobby/work/ws/v3/webservices/jsr109-
        impl/src/main/java/org/glassfish/webservices/EjbRuntimeEndpointInfo.java
        Transmitting file data ...
        Committed revision 34498.

        Show
        Bobby Bissett added a comment - Sending /Users/bobby/work/ws/v3/ejb/ejb-container/src/main/java/com/sun/ejb/EjbInvocation.java Sending /Users/bobby/work/ws/v3/ejb/ejb-internal- api/src/main/java/org/glassfish/ejb/api/EJBInvocation.java Sending /Users/bobby/work/ws/v3/webservices/jsr109- impl/src/main/java/org/glassfish/webservices/EjbRuntimeEndpointInfo.java Transmitting file data ... Committed revision 34498.
        Hide
        Bobby Bissett added a comment -

        Ok, the changes broke the web profile. Am testing a different version of the fix now.

        Show
        Bobby Bissett added a comment - Ok, the changes broke the web profile. Am testing a different version of the fix now.
        Hide
        Bobby Bissett added a comment -

        Am assigning to self since I'm the one causing all the trouble.

        Show
        Bobby Bissett added a comment - Am assigning to self since I'm the one causing all the trouble.
        Hide
        Bobby Bissett added a comment -

        Should now be fixed:

        Sending /Users/bobby/work/ws/v3/ejb/ejb-container/src/main/java/com/sun/ejb/EjbInvocation.java
        Sending /Users/bobby/work/ws/v3/ejb/ejb-internal-
        api/src/main/java/org/glassfish/ejb/api/EJBInvocation.java
        Sending /Users/bobby/work/ws/v3/webservices/jsr109-
        impl/src/main/java/org/glassfish/webservices/EjbRuntimeEndpointInfo.java
        Transmitting file data ...
        Committed revision 34536.

        Show
        Bobby Bissett added a comment - Should now be fixed: Sending /Users/bobby/work/ws/v3/ejb/ejb-container/src/main/java/com/sun/ejb/EjbInvocation.java Sending /Users/bobby/work/ws/v3/ejb/ejb-internal- api/src/main/java/org/glassfish/ejb/api/EJBInvocation.java Sending /Users/bobby/work/ws/v3/webservices/jsr109- impl/src/main/java/org/glassfish/webservices/EjbRuntimeEndpointInfo.java Transmitting file data ... Committed revision 34536.

          People

          • Assignee:
            Bobby Bissett
            Reporter:
            Cheng Fang
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: