Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.13
    • managed services

    Description

      Implement support for passing implicit "request" attributes from the proxy to the .NET service.

      Implementation notes.

      1. If no caller attributes are passed - there should be no performance overhead when executing service methods.
      2. Attributes allow only string and byte[] values and does not permit nulls in key/values.
      3. Currently, the context should be immutable, but in the future, it should be possible to change it through the interceptor.
      4. Context is bound to the NET proxy invocation handler (not to java invocation handler) and passed as an implicit parameter on every method call.

      Public API changes:
      API changes are very similar to java part.

      New methods inĀ IServices to pass caller context to service proxy.

      T GetServiceProxy<T>(string name, bool sticky, IServiceCallContext callCtx) where T : class; 
      dynamic GetDynamicServiceProxy(string name, bool sticky, IServiceCallContext callCtx);
      

      New method in IServiceContext for getting caller context inside the service method.

      IServiceCallContext CurrentCallContext();
      

      New interface IServiceCallContext.

      public interface IServiceCallContext
      {
          string Attribute(string name);
          byte[] BinaryAttribute(string name)
      }
      

      And the builder ServiceCallContextBuilder to create IServiceCallContext instance.

      Attachments

        Issue Links

          Activity

            People

              xtern Pavel Pereslegin
              xtern Pavel Pereslegin
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m