Home  >  Q&A  >  body text

java - dubbo distributed call passing parameters

Background: The existing code is modified. The original structure is to complete all business logic directly through the service() method of servlet; now the structure is modified, the service() method is split into several services, and through the dubbo framework, Services assemble business logic.

Problem: In the past, the structure used threadlocal thread local variables (for example, used to store sessions). Now that the program structure is modified and the separated services run in other jvm threads, threadlocal variables will definitely not be available.

I would like to know if the dubbo framework has any method that can be used to pass some session variable information.

给我你的怀抱给我你的怀抱2653 days ago831

reply all(1)I'll reply

  • 天蓬老师

    天蓬老师2017-06-14 10:53:38

    Parameters can be passed implicitly through the attachment of dubbo's RpcContext (map stores keyvalue).

    reply
    0
  • Cancelreply