Uploaded image for project: 'EJB Client Library (AS7+)'
  1. EJB Client Library (AS7+)
  2. EJBCLIENT-424

EJB remote invocation response payload contain ContextData not part of 'jboss.returned.keys'


    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 4.0.45.Final, 5.0.6.Final
    • 4.0.44.Final
    • None

      The response payload of an EJB invocation does contain ContextData that was initially sent from the client application to the server.

      This ContextData must not be part of the EJB response, unless a key/value is explicitly requested via the addReturnedContextDataKey(String key) method on the EJBClientInvocationContext class, see:

           * Indicates to the server that a client side interceptor is interested in the context data that is stored
           * under the given key. Any object on the context data map (i.e. {@code InvocationContext.getContextData()} that is
           * present at the end of the server invocation will be serialised and returned to the client.
           * If an object is present under this key and is not serializable then the request will fail.
           * @param key The context data key the client interceptor is interested in
          public void addReturnedContextDataKey(String key) {
              Object returnedData = getContextData().get(RETURNED_CONTEXT_DATA_KEY);
              if(returnedData == null) {
                  getContextData().put(RETURNED_CONTEXT_DATA_KEY, returnedData = new HashSet<>());
              } else if(!(returnedData instanceof Set)) {
                  throw Logs.INVOCATION.returnedContextDataKeyOfWrongType();
              Set<String> keys = (Set<String>) returnedData;

            rhn-support-jbaesner Joerg Baesner
            rhn-support-jbaesner Joerg Baesner
            0 Vote for this issue
            1 Start watching this issue